|
Blender V5.3
|
#include <algorithm>#include <cstdlib>#include <cstring>#include "atomic_ops.h"#include "BLI_utildefines.hh"#include "BLI_asan.hh"#include "BLI_math_base_c.hh"#include "BLI_mempool.hh"#include "BLI_mempool_private.h"#include "MEM_guardedalloc.h"#include "BLI_strict_flags.hh"Go to the source code of this file.
Classes | |
| struct | blender::BLI_freenode |
| struct | blender::BLI_mempool_chunk |
| struct | blender::BLI_mempool |
Namespaces | |
| namespace | blender |
| BMesh Iterators. | |
Macros | |
| #define | POISON_REDZONE_SIZE 0 |
| #define | MAKE_ID(a, b, c, d) |
| #define | MAKE_ID_8(a, b, c, d, e, f, g, h) |
| #define | FREEWORD |
| #define | USEDWORD MAKE_ID('u', 's', 'e', 'd') |
| #define | USE_CHUNK_POW2 |
| #define | MEMPOOL_ELEM_SIZE_MIN (sizeof(void *) * 2) |
| #define | CHUNK_DATA(chunk) |
| #define | NODE_STEP_NEXT(node) |
| #define | NODE_STEP_PREV(node) |
| #define | CHUNK_OVERHEAD uint(MEM_SIZE_OVERHEAD + sizeof(BLI_mempool_chunk)) |
Variables | |
| static bool | blender::mempool_debug_memset = false |
Simple, fast memory allocator for allocating many elements of the same size.
Supports:
Definition in file BLI_mempool.cc.
| #define CHUNK_DATA | ( | chunk | ) |
Definition at line 133 of file BLI_mempool.cc.
Referenced by blender::BLI_mempool_free(), blender::BLI_mempool_iterstep(), blender::mempool_chunk_add(), and blender::mempool_iter_threadsafe_step().
| #define CHUNK_OVERHEAD uint(MEM_SIZE_OVERHEAD + sizeof(BLI_mempool_chunk)) |
Extra bytes implicitly used for every chunk alloc.
Definition at line 140 of file BLI_mempool.cc.
Referenced by blender::BLI_mempool_create().
| #define FREEWORD |
Important that this value is not aligned with sizeof(void *). So having a pointer to 2/4/8... aligned memory is enough to ensure the freeword will never be used. To be safe, use a word that's the same in both directions.
Definition at line 63 of file BLI_mempool.cc.
Referenced by blender::BLI_mempool_free(), blender::BLI_mempool_iterstep(), blender::mempool_chunk_add(), and blender::mempool_iter_threadsafe_step().
| #define MAKE_ID | ( | a, | |
| b, | |||
| c, | |||
| d ) |
Definition at line 52 of file BLI_mempool.cc.
| #define MAKE_ID_8 | ( | a, | |
| b, | |||
| c, | |||
| d, | |||
| e, | |||
| f, | |||
| g, | |||
| h ) |
| #define MEMPOOL_ELEM_SIZE_MIN (sizeof(void *) * 2) |
Definition at line 131 of file BLI_mempool.cc.
Referenced by blender::BLI_mempool_create().
| #define NODE_STEP_NEXT | ( | node | ) |
Definition at line 136 of file BLI_mempool.cc.
Referenced by blender::BLI_mempool_as_array(), blender::BLI_mempool_free(), and blender::mempool_chunk_add().
| #define NODE_STEP_PREV | ( | node | ) |
Definition at line 137 of file BLI_mempool.cc.
Referenced by blender::BLI_mempool_free(), and blender::mempool_chunk_add().
| #define POISON_REDZONE_SIZE 0 |
Definition at line 47 of file BLI_mempool.cc.
Referenced by blender::BLI_mempool_alloc(), blender::BLI_mempool_as_array(), blender::BLI_mempool_calloc(), blender::BLI_mempool_create(), blender::BLI_mempool_free(), blender::BLI_mempool_iterstep(), blender::mempool_chunk_add(), and blender::mempool_iter_threadsafe_step().
| #define USE_CHUNK_POW2 |
Definition at line 73 of file BLI_mempool.cc.
| #define USEDWORD MAKE_ID('u', 's', 'e', 'd') |
The 'used' word just needs to be set to something besides FREEWORD.
Definition at line 70 of file BLI_mempool.cc.
Referenced by blender::BLI_mempool_alloc().