Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kPoolAlloc.h
Go to the documentation of this file.
1
8 #ifndef K_API_POOL_ALLOC_H
9 #define K_API_POOL_ALLOC_H
10
11 #include <kApi/kApiDef.h>
12 #include <kApi/Utils/kPoolAlloc.x.h>
13
43 //typedef kAlloc kPoolAlloc; --forward-declared in kApiDef.x.h
44
56 kFx(kStatus) kPoolAlloc_Construct(kPoolAlloc* object, kAlloc allocator);
57
73 kFx(kStatus) kPoolAlloc_SetBlockSize(kPoolAlloc object, kSize size);
74
82 kFx(kSize) kPoolAlloc_BlockSize(kPoolAlloc object);
83
95 kFx(kStatus) kPoolAlloc_SetMaxBlockBufferSize(kPoolAlloc object, kSize size);
96
104 kFx(kSize) kPoolAlloc_MaxBlockBufferSize(kPoolAlloc object);
105
117 kFx(kStatus) kPoolAlloc_SetBlockCapacity(kPoolAlloc object, kSize size);
118
126 kFx(kSize) kPoolAlloc_BlockCapacity(kPoolAlloc object);
127
145 kFx(kStatus) kPoolAlloc_EnableBlockReuse(kPoolAlloc object, kBool enabled);
146
154 kFx(kBool) kPoolAlloc_BlockReuseEnabled(kPoolAlloc object);
155
171 kFx(kStatus) kPoolAlloc_SetMaxCachedBufferSize(kPoolAlloc object, kSize size);
172
180 kFx(kSize) kPoolAlloc_MaxCachedBufferSize(kPoolAlloc object);
181
195 kFx(kStatus) kPoolAlloc_SetCacheCapacity(kPoolAlloc object, kSize size);
196
204 kFx(kSize) kPoolAlloc_CacheCapacity(kPoolAlloc object);
205
216 kFx(kStatus) kPoolAlloc_SetTotalCapacity(kPoolAlloc object, kSize size);
217
225 kFx(kSize) kPoolAlloc_TotalCapacity(kPoolAlloc object);
226
239 kFx(kStatus) kPoolAlloc_Start(kPoolAlloc object);
240
255 kFx(kStatus) kPoolAlloc_Reserve(kPoolAlloc object, kSize size);
256
274 kFx(kStatus) kPoolAlloc_ReserveAt(kPoolAlloc object, kSize rank, kSize size);
275
291 kFx(kStatus) kPoolAlloc_Clear(kPoolAlloc object);
292
300 kFx(kStatus) kPoolAlloc_ClearAll(kPoolAlloc object);
301
313 kFx(kSize) kPoolAlloc_BufferCountAt(kPoolAlloc object, kSize rank);
314
324 kFx(kSize) kPoolAlloc_TotalSize(kPoolAlloc object);
325
326 #endif
kPoolAlloc::kPoolAlloc_SetBlockCapacity
kStatus kPoolAlloc_SetBlockCapacity(kPoolAlloc object, kSize size)
Sets the maximum total amount of memory that can be used for block-based allocations.
kPoolAlloc::kPoolAlloc_SetMaxBlockBufferSize
kStatus kPoolAlloc_SetMaxBlockBufferSize(kPoolAlloc object, kSize size)
Sets the size limit for memory requests that can be allocated from larger blocks. ...
kPoolAlloc::kPoolAlloc_MaxCachedBufferSize
kSize kPoolAlloc_MaxCachedBufferSize(kPoolAlloc object)
Returns the size limit for memory requests that can be cached upon deallocation.
kPoolAlloc::kPoolAlloc_EnableBlockReuse
kStatus kPoolAlloc_EnableBlockReuse(kPoolAlloc object, kBool enabled)
Determines whether blocks can be reused between ranks.
kPoolAlloc::kPoolAlloc_BufferCountAt
kSize kPoolAlloc_BufferCountAt(kPoolAlloc object, kSize rank)
Reports the total number of memory buffers at the given rank.
kSize
Represents an unsigned integer that can store a pointer address.
kAlloc
Abstract base class for memory allocator types.
kPoolAlloc::kPoolAlloc_BlockSize
kSize kPoolAlloc_BlockSize(kPoolAlloc object)
Returns the approximate size of large memory blocks used to satisfy small memory requests.
kPoolAlloc::kPoolAlloc_TotalSize
kSize kPoolAlloc_TotalSize(kPoolAlloc object)
Reports the current amount of memory drawn from the underlying allocator.
kPoolAlloc::kPoolAlloc_SetCacheCapacity
kStatus kPoolAlloc_SetCacheCapacity(kPoolAlloc object, kSize size)
Sets the maximum total amount of memory that can be used to cache buffers upon deallocation.
kPoolAlloc::kPoolAlloc_Reserve
kStatus kPoolAlloc_Reserve(kPoolAlloc object, kSize size)
Specifies the minimum amount of memory that should be set aside for blocks.
kPoolAlloc::kPoolAlloc_SetTotalCapacity
kStatus kPoolAlloc_SetTotalCapacity(kPoolAlloc object, kSize size)
Sets the total amount of memory that can be requested from the underlying allocator.
kPoolAlloc::kPoolAlloc_TotalCapacity
kSize kPoolAlloc_TotalCapacity(kPoolAlloc object)
Returns the total amount of memory that can be requested from the underlying allocator.
kPoolAlloc::kPoolAlloc_SetBlockSize
kStatus kPoolAlloc_SetBlockSize(kPoolAlloc object, kSize size)
Sets the approximate size of large memory blocks used to satisfy small memory requests.
kPoolAlloc::kPoolAlloc_Start
kStatus kPoolAlloc_Start(kPoolAlloc object)
Prepares the allocator for first use.
kPoolAlloc::kPoolAlloc_ClearAll
kStatus kPoolAlloc_ClearAll(kPoolAlloc object)
Removes any existing memory reservations and returns surplus memory to the underlying allocator...
kApiDef.h
Core Zen type declarations.
kPoolAlloc::kPoolAlloc_BlockCapacity
kSize kPoolAlloc_BlockCapacity(kPoolAlloc object)
Returns the maximum amount of memory that can be used for block-based allocations.
kPoolAlloc::kPoolAlloc_Construct
kStatus kPoolAlloc_Construct(kPoolAlloc *object, kAlloc allocator)
Constructs a kPoolAlloc object.
kPoolAlloc::kPoolAlloc_MaxBlockBufferSize
kSize kPoolAlloc_MaxBlockBufferSize(kPoolAlloc object)
Returns the size limit for memory requests that can be allocated from larger blocks.
kPoolAlloc::kPoolAlloc_BlockReuseEnabled
kBool kPoolAlloc_BlockReuseEnabled(kPoolAlloc object)
Reports whether blocks can be reused between ranks.
kPoolAlloc::kPoolAlloc_ReserveAt
kStatus kPoolAlloc_ReserveAt(kPoolAlloc object, kSize rank, kSize size)
Specifies the minimum amount of memory that should be set aside at a particular rank.
kPoolAlloc::kPoolAlloc_Clear
kStatus kPoolAlloc_Clear(kPoolAlloc object)
Returns surplus memory to the underlying allocator.
kStatus
Represents an error code.
kPoolAlloc
Allocates small buffers from larger blocks and/or caches deallocated buffers for later reuse...
kPoolAlloc::kPoolAlloc_SetMaxCachedBufferSize
kStatus kPoolAlloc_SetMaxCachedBufferSize(kPoolAlloc object, kSize size)
Sets the size limit for memory requests that can be cached upon deallocation.
kBool
Represents a boolean value.
kPoolAlloc::kPoolAlloc_CacheCapacity
kSize kPoolAlloc_CacheCapacity(kPoolAlloc object)
Returns the maximum total amount of memory that can be used to cache buffers upon deallocation...