diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-02 03:59:34 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-02 03:59:34 +0400 |
commit | 979a80e74398dd68f013b8ca1f18b2653a4f6338 (patch) | |
tree | a7051b7a1a5db8844d3a44636aa8bae704a16eca /source/blender/bmesh | |
parent | c26f5035b66d3be3f4996625b79ba9dd58c1d27e (diff) |
minor edits to last commit - use fixed chunksize, rather than the number of verts/edges/faces in bm_mempool_init().
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mesh.c | 9 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mesh.h | 1 |
2 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c index b8d30f72509..92ee2221b6e 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.c +++ b/source/blender/bmesh/intern/bmesh_mesh.c @@ -45,13 +45,14 @@ /* used as an extern, defined in bmesh.h */ BMAllocTemplate bm_mesh_allocsize_default = {512, 1024, 2048, 512}; +BMAllocTemplate bm_mesh_chunksize_default = {512, 1024, 2048, 512}; static void bm_mempool_init(BMesh *bm, const BMAllocTemplate *allocsize) { - bm->vpool = BLI_mempool_create(sizeof(BMVert), allocsize->totvert, allocsize->totvert, BLI_MEMPOOL_ALLOW_ITER); - bm->epool = BLI_mempool_create(sizeof(BMEdge), allocsize->totedge, allocsize->totedge, BLI_MEMPOOL_ALLOW_ITER); - bm->lpool = BLI_mempool_create(sizeof(BMLoop), allocsize->totloop, allocsize->totloop, 0); - bm->fpool = BLI_mempool_create(sizeof(BMFace), allocsize->totface, allocsize->totface, BLI_MEMPOOL_ALLOW_ITER); + bm->vpool = BLI_mempool_create(sizeof(BMVert), allocsize->totvert, bm_mesh_chunksize_default.totvert, BLI_MEMPOOL_ALLOW_ITER); + bm->epool = BLI_mempool_create(sizeof(BMEdge), allocsize->totedge, bm_mesh_chunksize_default.totedge, BLI_MEMPOOL_ALLOW_ITER); + bm->lpool = BLI_mempool_create(sizeof(BMLoop), allocsize->totloop, bm_mesh_chunksize_default.totloop, 0); + bm->fpool = BLI_mempool_create(sizeof(BMFace), allocsize->totface, bm_mesh_chunksize_default.totface, BLI_MEMPOOL_ALLOW_ITER); #ifdef USE_BMESH_HOLES bm->looplistpool = BLI_mempool_create(sizeof(BMLoopList), allocsize[3], allocsize[3], FALSE, FALSE); diff --git a/source/blender/bmesh/intern/bmesh_mesh.h b/source/blender/bmesh/intern/bmesh_mesh.h index ea80696a855..d045cd8be90 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.h +++ b/source/blender/bmesh/intern/bmesh_mesh.h @@ -53,5 +53,6 @@ typedef struct BMAllocTemplate { } BMAllocTemplate; extern BMAllocTemplate bm_mesh_allocsize_default; +extern BMAllocTemplate bm_mesh_chunksize_default; #endif /* __BMESH_MESH_H__ */ |