diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-10-10 22:18:13 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-10-10 22:18:13 +0400 |
commit | e220d3228f48d4cb3256b398b45b40bf6892e550 (patch) | |
tree | 39f9bdca2ee2e37bc7f17827006a00d7bfbb8a06 /source/blender/blenlib/intern/BLI_heap.c | |
parent | 8fd52b34330354f5a8d285fd0888ffe7e72895b1 (diff) |
add MEM_SIZE_OPTIMAL to avoid memory fragmentation & waste lost to slop-space.
Diffstat (limited to 'source/blender/blenlib/intern/BLI_heap.c')
-rw-r--r-- | source/blender/blenlib/intern/BLI_heap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/BLI_heap.c b/source/blender/blenlib/intern/BLI_heap.c index 45bdeeedcf9..206a8041c4a 100644 --- a/source/blender/blenlib/intern/BLI_heap.c +++ b/source/blender/blenlib/intern/BLI_heap.c @@ -127,7 +127,7 @@ Heap *BLI_heap_new_ex(unsigned int tot_reserve) /* ensure we have at least one so we can keep doubling it */ heap->bufsize = MAX2(1, tot_reserve); heap->tree = (HeapNode **)MEM_mallocN(heap->bufsize * sizeof(HeapNode *), "BLIHeapTree"); - heap->arena = BLI_memarena_new(1 << 16, "heap arena"); + heap->arena = BLI_memarena_new(MEM_SIZE_OPTIMAL(1 << 16), "heap arena"); return heap; } |