|
Blender V4.3
|
Enumerations | |
| enum class | AllocationType { ALLOC_FREE , NEW_DELETE } |
Functions | |
| void | add_memleak_data (std::any data) |
Variables | |
| void(* | mem_freeN_ex )(void *vmemh, AllocationType allocation_type) = MEM_lockfree_freeN |
| void *(* | mem_mallocN_aligned_ex )(size_t len, size_t alignment, const char *str, AllocationType allocation_type) |
|
strong |
| Enumerator | |
|---|---|
| ALLOC_FREE | Allocation is handled through 'C type' alloc/free calls. |
| NEW_DELETE | Allocation is handled through 'C++ type' new/delete calls. |
Definition at line 13 of file mallocn_intern_function_pointers.hh.
| void mem_guarded::internal::add_memleak_data | ( | std::any | data | ) |
Store a std::any into a static opaque storage vector. The only purpose of this call is to control the lifetime of the given data, there is no way to access it from here afterwards. User code is expected to keep its own reference to the data contained in the std::any as long as it needs it.
Typically, this any should contain a shared_ptr to the actual data, to ensure that the data itself is not duplicated, and that the static storage does become an owner of it.
That way, the memleak data does not get destructed before the static storage is. Since this storage is created before the memleak detection data (see the implementation of MEM_init_memleak_detection), it is guaranteed to happen after the execution and destruction of the memleak detector.
Definition at line 96 of file leak_detector.cc.
Referenced by MEM_init_memleak_detection().
|
extern |
Internal implementation of MEM_freeN, exposed because #MEM_delete needs access to it.
Definition at line 37 of file mallocn.cc.
Referenced by MEM_freeN(), MEM_use_guarded_allocator(), MEM_use_lockfree_allocator(), operator delete(), and operator delete[]().
|
extern |
Internal implementation of MEM_mallocN_aligned, exposed because #MEM_new needs access to it.
Definition at line 46 of file mallocn.cc.
Referenced by MEM_mallocN_aligned(), MEM_use_guarded_allocator(), MEM_use_lockfree_allocator(), operator new(), operator new(), operator new[](), and operator new[]().