Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoffrey Bantle <hairbat@yahoo.com>2008-06-01 21:15:03 +0400
committerGeoffrey Bantle <hairbat@yahoo.com>2008-06-01 21:15:03 +0400
commit07b1608fbe52f729eae39c307060f92948aabf37 (patch)
tree96dcc1dde0038151362edfa437c843d042653e0d /source/blender/src
parent652ee1e31baa52c8e504bfcf3759ea94c7f5ab66 (diff)
-> New memory allocator for Bmesh
Added a new pooling allocator for Bmesh based upon the pool allocator availible in the Boost C++ library as described here: http://www.boost.org/doc/libs/1_34_0/libs/pool/doc/concepts.html Each pool allocates elements of a fixed size, so every element type in a mesh gets its own pool. For instance verts occupy a different pool than edges. Each pool is comprised of multiple arrays of a fixed size and allocating /freeing elements is simple as removing or adding a head to a linked list. Since the list of free elements is interleaved throughout the unused space in the arrays, the overhead for storing the free list is only 1 pointer total per pool. This makes building/destroying bmesh structures much faster and saves quite a bit of memory as well.
Diffstat (limited to 'source/blender/src')
-rw-r--r--source/blender/src/editmesh_tools.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c
index d4ebe181218..d90a7eb7c16 100644
--- a/source/blender/src/editmesh_tools.c
+++ b/source/blender/src/editmesh_tools.c
@@ -4497,7 +4497,7 @@ void bevel_menu() {
while(G.editBMesh->options & BME_BEVEL_RUNNING) {
options = G.editBMesh->options;
res = G.editBMesh->res;
- bm = BME_make_mesh();
+ bm = BME_make_mesh(512,512,2048,512);
bm = BME_editmesh_to_bmesh(G.editMesh, bm);
BIF_undo_push("Pre-Bevel");
free_editMesh(G.editMesh);