Perform calculation on bit size in 64-bit
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 28 Sep 2012 00:25:11 +0000 (20:25 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 28 Sep 2012 00:25:11 +0000 (20:25 -0400)
allow 32-bit architectures to have sub-buffers larger than 256MB.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-ring-buffer-client.h

index 47059b4577ce32875c67f45c5329b275555e66d4..0b05561a5bf9d8a547247ca3fa122a67fa92f6c0 100644 (file)
@@ -370,8 +370,10 @@ static void client_buffer_end(struct lib_ring_buffer *buf, u64 tsc,
        unsigned long records_lost = 0;
 
        header->ctx.timestamp_end = tsc;
-       header->ctx.content_size = data_size * CHAR_BIT;        /* in bits */
-       header->ctx.packet_size = PAGE_ALIGN(data_size) * CHAR_BIT; /* in bits */
+       header->ctx.content_size =
+               (uint64_t) data_size * CHAR_BIT;                /* in bits */
+       header->ctx.packet_size =
+               (uint64_t) PAGE_ALIGN(data_size) * CHAR_BIT;    /* in bits */
        records_lost += lib_ring_buffer_get_records_lost_full(&client_config, buf);
        records_lost += lib_ring_buffer_get_records_lost_wrap(&client_config, buf);
        records_lost += lib_ring_buffer_get_records_lost_big(&client_config, buf);
This page took 0.027024 seconds and 4 git commands to generate.