Blender Git Loki

Git Commits -> Revision 07b1608

Revision 07b1608 by Geoffrey Bantle (master)
June 1, 2008, 17:15 (GMT)
-> 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.

Commit Details:

Full Hash: 07b1608fbe52f729eae39c307060f92948aabf37
SVN Revision: 15081
Parent Commit: 652ee1e
Lines Changed: +184, -77

6 Modified Paths:

/source/blender/blenkernel/BKE_bmesh.h (+13, -6) (Diff)
/source/blender/blenkernel/intern/bmesh_private.h (+10, -1) (Diff)
/source/blender/blenkernel/intern/BME_mesh.c (+21, -44) (Diff)
/source/blender/blenkernel/intern/BME_structure.c (+138, -24) (Diff)
/source/blender/blenkernel/intern/modifier.c (+1, -1) (Diff)
/source/blender/src/editmesh_tools.c (+1, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021