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
13 kBeginHeader()
14
15
44 //typedef kAlloc kPoolAlloc; --forward-declared in kApiDef.x.h
45
46
57 kFx(kStatus) kPoolAlloc_Construct(kPoolAlloc* object, kAlloc allocator);
58
74 kFx(kStatus) kPoolAlloc_SetBlockSize(kPoolAlloc object, kSize size);
75
83 kFx(kSize) kPoolAlloc_BlockSize(kPoolAlloc object);
84
96 kFx(kStatus) kPoolAlloc_SetMaxBlockBufferSize(kPoolAlloc object, kSize size);
97
105 kFx(kSize) kPoolAlloc_MaxBlockBufferSize(kPoolAlloc object);
106
118 kFx(kStatus) kPoolAlloc_SetBlockCapacity(kPoolAlloc object, kSize size);
119
127 kFx(kSize) kPoolAlloc_BlockCapacity(kPoolAlloc object);
128
146 kFx(kStatus) kPoolAlloc_EnableBlockReuse(kPoolAlloc object, kBool enabled);
147
155 kFx(kBool) kPoolAlloc_BlockReuseEnabled(kPoolAlloc object);
156
172 kFx(kStatus) kPoolAlloc_SetMaxCachedBufferSize(kPoolAlloc object, kSize size);
173
181 kFx(kSize) kPoolAlloc_MaxCachedBufferSize(kPoolAlloc object);
182
196 kFx(kStatus) kPoolAlloc_SetCacheCapacity(kPoolAlloc object, kSize size);
197
205 kFx(kSize) kPoolAlloc_CacheCapacity(kPoolAlloc object);
206
217 kFx(kStatus) kPoolAlloc_SetTotalCapacity(kPoolAlloc object, kSize size);
218
226 kFx(kSize) kPoolAlloc_TotalCapacity(kPoolAlloc object);
227
240 kFx(kStatus) kPoolAlloc_Start(kPoolAlloc object);
241
256 kFx(kStatus) kPoolAlloc_Reserve(kPoolAlloc object, kSize size);
257
275 kFx(kStatus) kPoolAlloc_ReserveAt(kPoolAlloc object, kSize rank, kSize size);
276
292 kFx(kStatus) kPoolAlloc_Clear(kPoolAlloc object);
293
301 kFx(kStatus) kPoolAlloc_ClearAll(kPoolAlloc object);
302
314 kFx(kSize) kPoolAlloc_BufferCountAt(kPoolAlloc object, kSize rank);
315
325 kFx(kSize) kPoolAlloc_TotalSize(kPoolAlloc object);
326
327 kEndHeader()
328
329 #include <kApi/Utils/kPoolAlloc.x.h>
330
331 #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...