10 #ifndef K_API_USER_ALLOC_H
11 #define K_API_USER_ALLOC_H
14 #include <kApi/Utils/kUserAlloc.x.h>
48 xkUserAlloc_Cast(
object)->base.isForeign = enable;
62 xkUserAlloc_Cast(
object)->base.canGetObject = enable;
kStatus(kCall * kApiMemFreeFx)(kPointer provider, void *mem)
Function signature for memory free handler.
Definition: kApiLib.h:25
void kUserAlloc_EnableForeignMemory(kUserAlloc object, kBool enable)
Controls whether this allocator will report that it emits foreign memory.
Definition: kUserAlloc.h:46
void kUserAlloc_EnableObjectMemory(kUserAlloc object, kBool enable)
Controls whether this allocator will report that it is capable of allocating objects.
Definition: kUserAlloc.h:60
kStatus(kCall * kApiMemAllocFx)(kPointer provider, kSize size, void *mem)
Function signature for memory allocation handler.
Definition: kApiLib.h:19
Represents a void pointer.
Abstract base class for memory allocator types.
#define kInlineFx(TYPE)
Inline method declaration helper.
Definition: kApiDef.h:26
kPointer kUserAlloc_Provider(kUserAlloc object)
Gets provider handle passed to kUserAlloc constructor.
Allocates memory from a user-defined memory source.
Core Zen type declarations.
kStatus kUserAlloc_Construct(kUserAlloc *object, kApiMemAllocFx allocFx, kApiMemFreeFx freeFx, kPointer provider, kAlloc allocator)
Constructs a new kUserAlloc instance.
Represents an error code.
Represents a boolean value.