|
Blender V4.3
|
#include <BLI_allocator.hh>
Public Member Functions | |
| void * | allocate (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 60 of file BLI_allocator.hh.
|
inline |
Definition at line 64 of file BLI_allocator.hh.
References MEM_mallocN_aligned(), and blender::GuardedAlignedAllocator< Alignment >::min_alignment.
|
inline |
Definition at line 69 of file BLI_allocator.hh.
References MEM_freeN(), and ptr.
|
staticconstexpr |
Definition at line 62 of file BLI_allocator.hh.
Referenced by blender::GuardedAlignedAllocator< Alignment >::allocate().