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

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/ltt-ring-buffer-client.h

index e47a508cb31abeb1bd6003f6e26bbc7fabb1e265..0e329bad575f40f3d2e107990b57df77a0d6683f 100644 (file)
@@ -365,8 +365,10 @@ static void client_buffer_end(struct lttng_ust_lib_ring_buffer *buf, uint64_t ts
        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);
This page took 0.025411 seconds and 4 git commands to generate.