| include/Zycore/Allocator.h(3) | Library Functions Manual | include/Zycore/Allocator.h(3) |
include/Zycore/Allocator.h
#include <Zycore/Status.h>
#include <Zycore/Types.h>
struct ZyanAllocator_
typedef ZyanStatus(* ZyanAllocatorAllocate) (struct
ZyanAllocator_ *allocator, void **p, ZyanUSize element_size,
ZyanUSize n)
typedef ZyanStatus(* ZyanAllocatorDeallocate) (struct
ZyanAllocator_ *allocator, void *p, ZyanUSize element_size, ZyanUSize
n)
typedef struct ZyanAllocator_ ZyanAllocator
ZYCORE_EXPORT ZyanStatus ZyanAllocatorInit
(ZyanAllocator *allocator, ZyanAllocatorAllocate allocate,
ZyanAllocatorAllocate reallocate, ZyanAllocatorDeallocate
deallocate)
ZYCORE_EXPORT ZYAN_REQUIRES_LIBC ZyanAllocator *
ZyanAllocatorDefault (void)
Defines the ZyanAllocator struct.
This is the base class for all custom allocator implementations.
All fields in this struct should be considered as 'private'. Any changes may lead to unexpected behavior.
Defines the ZyanAllocatorAllocate function prototype.
Parameters
Returns
This prototype is used for the allocate() and reallocate() functions.
The result of the reallocate() function is undefined, if p does not point to a memory block previously obtained by (re-)allocate().
Defines the ZyanAllocatorDeallocate function prototype.
Parameters
Returns
Returns the default ZyanAllocator instance.
Returns
The default allocator uses the default memory manager to allocate memory on the heap.
You should in no case modify the returned allocator instance to avoid unexpected behavior.
Initializes the given ZyanAllocator instance.
Parameters
Returns
Generated automatically by Doxygen for Zycore from the source code.
| Version 1.5.2.0 | Zycore |