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/editors/mesh | |
parent | 8fd52b34330354f5a8d285fd0888ffe7e72895b1 (diff) |
add MEM_SIZE_OPTIMAL to avoid memory fragmentation & waste lost to slop-space.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_knife.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 5e88ecabd35..9d8b283fe1a 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -2131,7 +2131,7 @@ static void knifenet_fill_faces(KnifeTool_OpData *kcd) facenet_entry *entry; ListBase *face_nets = MEM_callocN(sizeof(ListBase) * bm->totface, "face_nets"); BMFace **faces = MEM_callocN(sizeof(BMFace *) * bm->totface, "faces knife"); - MemArena *arena = BLI_memarena_new(1 << 16, "knifenet_fill_faces"); + MemArena *arena = BLI_memarena_new(MEM_SIZE_OPTIMAL(1 << 16), "knifenet_fill_faces"); SmallHash shash; RNG *rng; int i, j, k = 0, totface = bm->totface; @@ -3159,7 +3159,7 @@ static void knifetool_init(bContext *C, KnifeTool_OpData *kcd, (only_select ? BMBVH_RESPECT_SELECT : BMBVH_RESPECT_HIDDEN), kcd->cagecos, false); - kcd->arena = BLI_memarena_new(1 << 15, "knife"); + kcd->arena = BLI_memarena_new(MEM_SIZE_OPTIMAL(1 << 15), "knife"); kcd->vthresh = KMAXDIST - 1; kcd->ethresh = KMAXDIST; |