Skip to content
Snippets Groups Projects
Commit d26250be authored by Craig Tiller's avatar Craig Tiller
Browse files

Get growth right

parent ff23f801
No related branches found
No related tags found
No related merge requests found
...@@ -78,8 +78,7 @@ void *gpr_arena_alloc(gpr_arena *arena, size_t size) { ...@@ -78,8 +78,7 @@ void *gpr_arena_alloc(gpr_arena *arena, size_t size) {
while (start > z->size_end) { while (start > z->size_end) {
zone *next_z = (zone *)gpr_atm_acq_load(&z->next_atm); zone *next_z = (zone *)gpr_atm_acq_load(&z->next_atm);
if (next_z == NULL) { if (next_z == NULL) {
size_t next_z_size = size_t next_z_size = (size_t)gpr_atm_no_barrier_load(&arena->size_so_far);
GPR_MAX((size_t)gpr_atm_no_barrier_load(&arena->size_so_far), size);
next_z = gpr_zalloc(sizeof(zone) + next_z_size); next_z = gpr_zalloc(sizeof(zone) + next_z_size);
next_z->size_begin = z->size_end; next_z->size_begin = z->size_end;
next_z->size_end = z->size_end + next_z_size; next_z->size_end = z->size_end + next_z_size;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment