|
|
using | DataPointer = uint8_t * |
| |
§ PoolAllocator() [1/2]
creates empty Pool allocator (nullptr chunk pointer, count = 0)
§ PoolAllocator() [2/2]
constructs Pool allocator, assigning it memory chunk
- Parameters
-
| data | begin of memory chunk |
| bytes | size in bytes of memory chunk |
§ ~PoolAllocator()
destroys Pool allocator and all objects stored in it
§ Alloc()
template<typename T >
template<typename... Args>
constructs object of type T in memory and returns pointer to it
- Parameters
-
| args | arguments for object construction |
- Returns
- pointer to object (object destructor is automatically called in ~PoolAllocator())
§ Dump()
prints whole memory chunk byte by byte in hex format into stream provided
- Parameters
-
§ Free()
destroyes object of type T, calling its destructor
- Parameters
-
§ GetBase()
memory chunk getter
- Returns
- pointer to begin of memory chunk
§ Init()
assigns new memory chunk to Pool allocator
- Parameters
-
| data | begin of memory chunk |
| bytes | size in bytes of memory chunk |
§ StackAlloc()
template<typename T >
template<typename... Args>
constructs object of type T
- Parameters
-
| args | arguments for object construction |
- Returns
- smart pointer to object with custom deleter
§ Transfer()
transfers blocks from one memory chunk to another
- Parameters
-
| newData | begin of new memory chunk |
| newBytes | size of new memory chunk (must be not less than old size) |
- Warning
- during transfer all pointers to allocated objects are invalidated
The documentation for this class was generated from the following file: