Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kAlloc.h
Go to the documentation of this file.
1
10 #include <kApi/kApiDef.h> //--inclusion order controlled by kApiDef
11
12 #ifndef K_API_ALLOC_H
13 #define K_API_ALLOC_H
14
15 kBeginHeader()
16
17
33 kFx(kStatus) kAlloc_Get(kAlloc alloc, kSize size, void* mem);
34
44 kFx(kStatus) kAlloc_GetZero(kAlloc alloc, kSize size, void* mem);
45
54 kFx(kStatus) kAlloc_Free(kAlloc alloc, void* mem);
55
64 kFx(kStatus) kAlloc_FreeRef(kAlloc alloc, void* mem);
65
75 kFx(kAlloc) kAlloc_App();
76
88 kFx(kAlloc) kAlloc_System();
89
97 kFx(kAlloc) kAlloc_Fallback(kAlloc alloc);
98
100 #define kAlloc_Get_(ALLOC, SIZE, MEM) kxAlloc_Get_(ALLOC, SIZE, MEM)
101 #define kAlloc_GetZero_(ALLOC, SIZE, MEM) kxAlloc_GetZero_(ALLOC, SIZE, MEM)
102 #define kAlloc_Free_(ALLOC, MEM) kxAlloc_Free_(ALLOC, MEM)
103 #define kAlloc_FreeRef_(ALLOC, MEM) kxAlloc_FreeRef_(ALLOC, MEM)
104 #define kAlloc_App_() kxAlloc_App_()
105 #define kAlloc_System_() kxAlloc_System_()
106 #define kAlloc_Fallback_(ALLOC) kxAlloc_Fallback_(ALLOC)
107
109 kEndHeader()
110
111 #include <kApi/kAlloc.x.h>
112
113 #endif
kAlloc::kAlloc_Fallback
kAlloc kAlloc_Fallback(kAlloc alloc)
Returns the passed allocator, or if null, the App allocator.
kAlloc::kAlloc_App
kAlloc kAlloc_App()
Gets the allocator that should normally be used by applications to request memory.
kSize
Represents an unsigned integer that can store a pointer address.
kAlloc
Abstract base class for memory allocator types.
kAlloc::kAlloc_Free
kStatus kAlloc_Free(kAlloc alloc, void *mem)
Frees a block of memory.
kAlloc::kAlloc_System
kAlloc kAlloc_System()
Gets the system allocator.
kApiDef.h
Core Zen type declarations.
kAlloc::kAlloc_FreeRef
kStatus kAlloc_FreeRef(kAlloc alloc, void *mem)
Frees a block of memory and sets the memory pointer to kNULL.
kStatus
Represents an error code.
kAlloc::kAlloc_Get
kStatus kAlloc_Get(kAlloc alloc, kSize size, void *mem)
Allocates a block of memory.
kAlloc::kAlloc_GetZero
kStatus kAlloc_GetZero(kAlloc alloc, kSize size, void *mem)
Allocates a block of memory and zero-initializes the block.