#include <nullallocator.h>
The Null allocator is an allocator that returns no memory, no matter what memory size was requested. It can be used, e.g. in combination with the class FixedBufferAllocator . THREADSAFE.
静态公共成员函数 |
|
static Int | ComputeArraySize ( Int currentSize, Int increment, Int MINCHUNKSIZE) |
static MAXON_ATTRIBUTE_FORCE_INLINE void * | Alloc ( Int32 s, MAXON_SOURCE_LOCATION_DECLARATION ) |
static MAXON_ATTRIBUTE_FORCE_INLINE void * | Alloc ( Int64 s, MAXON_SOURCE_LOCATION_DECLARATION ) |
static MAXON_ATTRIBUTE_FORCE_INLINE void * | Realloc (void *p, Int32 n, MAXON_SOURCE_LOCATION_DECLARATION ) |
static MAXON_ATTRIBUTE_FORCE_INLINE void * | Realloc (void *p, Int64 n, MAXON_SOURCE_LOCATION_DECLARATION ) |
template<typename T > | |
static MAXON_ATTRIBUTE_FORCE_INLINE void | Free (T *&p) |
static MAXON_ATTRIBUTE_FORCE_INLINE Bool | IsCompatibleWithDefaultAllocator (void *) |
|
static |
Computes the new size for a growing array, same as in DefaultAllocator THREADSAFE.
|
static |
'Fakes' allocate memory THREADSAFE.
[in] | s | Block size in bytes. |
[in] | allocLocation | Pass MAXON_SOURCE_LOCATION(_NAME) to add the current source line and file. |
|
static |
'Fakes' allocate memory THREADSAFE.
[in] | s | Block size in bytes. |
[in] | allocLocation | Pass MAXON_SOURCE_LOCATION(_NAME) to add the current source line and file. |
|
static |
'Fakes' resize memory THREADSAFE.
[in] | p | Current memory block (can be nullptr) |
[in] | n | New block size in bytes (values < 0 will return nullptr) |
[in] | allocLocation | Pass MAXON_SOURCE_LOCATION(_NAME) to add the current source line and file. |
|
static |
'Fakes' resize memory THREADSAFE.
[in] | p | Current memory block (can be nullptr) |
[in] | n | New block size in bytes (values < 0 will return nullptr) |
[in] | allocLocation | Pass MAXON_SOURCE_LOCATION(_NAME) to add the current source line and file. |
|
static |
'Fakes' free a memory block THREADSAFE.
[in,out] | p | Memory block address (can be nullptr, will be nullptr after return) |
|
static |
Returns if a memory block allocated via this allocator can be reallocated or freed by the DefaultAllocator .