X-Git-Url: https://git.lttng.org/?p=userspace-rcu.git;a=blobdiff_plain;f=urcu-bp.c;fp=urcu-bp.c;h=ac8c6806e1008e5314f61e013b31e6b454e3fb69;hp=f78935e1af2d5d9883946f0aef201a6928d3a90a;hb=5cedb8543795f9ebc989fa705d1db7eb7855158e;hpb=bf687a4fa23269a7fe8bfa4dbd30a5f3c501e1c3 diff --git a/urcu-bp.c b/urcu-bp.c index f78935e..ac8c680 100644 --- a/urcu-bp.c +++ b/urcu-bp.c @@ -355,7 +355,8 @@ void expand_arena(struct registry_arena *arena) sizeof(struct registry_chunk) + sizeof(struct rcu_reader)); new_chunk_len = ARENA_INIT_ALLOC; - new_chunk = mmap(NULL, new_chunk_len, + new_chunk = (struct registry_chunk *) mmap(NULL, + new_chunk_len, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); @@ -389,7 +390,8 @@ void expand_arena(struct registry_arena *arena) } /* Remap did not succeed, we need to add a new chunk. */ - new_chunk = mmap(NULL, new_chunk_len, + new_chunk = (struct registry_chunk *) mmap(NULL, + new_chunk_len, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); @@ -587,7 +589,7 @@ void _rcu_bp_exit(void) cds_list_for_each_entry_safe(chunk, tmp, ®istry_arena.chunk_list, node) { - munmap(chunk, chunk->data_len + munmap((void *) chunk, chunk->data_len + sizeof(struct registry_chunk)); } CDS_INIT_LIST_HEAD(®istry_arena.chunk_list);