|
Blender V5.3
|
#include <BLI_allocator.hh>
Public Member Functions | |
| void * | allocate (size_t size, size_t alignment, const char *name) |
| void * | allocate_zero (size_t size, size_t alignment, const char *name) |
| void | deallocate (void *ptr) |
Static Public Attributes | |
| static constexpr size_t | min_alignment = Alignment |
Like GuardedAllocator, but makes sure each allocation has a minimum alignment. One use case is reusing an allocation between multiple types that have different alignment requirements. The default alignment template parameter should be large enough for any type in practice.
Definition at line 71 of file BLI_allocator.hh.
|
inline |
Definition at line 75 of file BLI_allocator.hh.
References blender::MEM_new_uninitialized_aligned(), and min_alignment.
Referenced by allocate_zero().
|
inline |
Definition at line 79 of file BLI_allocator.hh.
References allocate(), and blender::MEM_new_zeroed().
|
inline |
Definition at line 90 of file BLI_allocator.hh.
References blender::MEM_delete_void().
|
staticconstexpr |
Definition at line 73 of file BLI_allocator.hh.
Referenced by allocate().