forked from osmocom/wireshark
Little things make big differences: somehow while I was experimenting this
unobtrusive if statement got dropped. Without it the allocator exhibits the old bad behaviour of 3x memory usage and heavy fragmentation. We want it back, thank you very much. svn path=/trunk/; revision=50960
This commit is contained in:
parent
9b9467cb79
commit
e7dfea82f3
|
@ -368,7 +368,9 @@ wmem_block_add_to_recycler(wmem_block_allocator_t *allocator,
|
|||
WMEM_GET_FREE(free_chunk->next)->prev = chunk;
|
||||
WMEM_GET_FREE(free_chunk->prev)->next = chunk;
|
||||
|
||||
allocator->recycler_head = chunk;
|
||||
if (chunk->len > allocator->recycler_head->len) {
|
||||
allocator->recycler_head = chunk;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue