Zen API
 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 
74 
83 
96 
105 
118 
127 
146 
155 
172 
181 
196 
205 
217 
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 
301 
314 
325 
326 #endif
kStatus kPoolAlloc_SetBlockCapacity(kPoolAlloc object, kSize size)
Sets the maximum total amount of memory that can be used for block-based allocations.
kStatus kPoolAlloc_SetMaxBlockBufferSize(kPoolAlloc object, kSize size)
Sets the size limit for memory requests that can be allocated from larger blocks. ...
kSize kPoolAlloc_MaxCachedBufferSize(kPoolAlloc object)
Returns the size limit for memory requests that can be cached upon deallocation.
kStatus kPoolAlloc_EnableBlockReuse(kPoolAlloc object, kBool enabled)
Determines whether blocks can be reused between ranks.
kSize kPoolAlloc_BufferCountAt(kPoolAlloc object, kSize rank)
Reports the total number of memory buffers at the given rank.
Represents an unsigned integer that can store a pointer address.
Abstract base class for memory allocator types.
kSize kPoolAlloc_BlockSize(kPoolAlloc object)
Returns the approximate size of large memory blocks used to satisfy small memory requests.
kSize kPoolAlloc_TotalSize(kPoolAlloc object)
Reports the current amount of memory drawn from the underlying allocator.
kStatus kPoolAlloc_SetCacheCapacity(kPoolAlloc object, kSize size)
Sets the maximum total amount of memory that can be used to cache buffers upon deallocation.
kStatus kPoolAlloc_Reserve(kPoolAlloc object, kSize size)
Specifies the minimum amount of memory that should be set aside for blocks.
kStatus kPoolAlloc_SetTotalCapacity(kPoolAlloc object, kSize size)
Sets the total amount of memory that can be requested from the underlying allocator.
kSize kPoolAlloc_TotalCapacity(kPoolAlloc object)
Returns the total amount of memory that can be requested from the underlying allocator.
kStatus kPoolAlloc_SetBlockSize(kPoolAlloc object, kSize size)
Sets the approximate size of large memory blocks used to satisfy small memory requests.
kStatus kPoolAlloc_Start(kPoolAlloc object)
Prepares the allocator for first use.
kStatus kPoolAlloc_ClearAll(kPoolAlloc object)
Removes any existing memory reservations and returns surplus memory to the underlying allocator...
Core Zen type declarations.
kSize kPoolAlloc_BlockCapacity(kPoolAlloc object)
Returns the maximum amount of memory that can be used for block-based allocations.
kStatus kPoolAlloc_Construct(kPoolAlloc *object, kAlloc allocator)
Constructs a kPoolAlloc object.
kSize kPoolAlloc_MaxBlockBufferSize(kPoolAlloc object)
Returns the size limit for memory requests that can be allocated from larger blocks.
kBool kPoolAlloc_BlockReuseEnabled(kPoolAlloc object)
Reports whether blocks can be reused between ranks.
kStatus kPoolAlloc_ReserveAt(kPoolAlloc object, kSize rank, kSize size)
Specifies the minimum amount of memory that should be set aside at a particular rank.
kStatus kPoolAlloc_Clear(kPoolAlloc object)
Returns surplus memory to the underlying allocator.
Represents an error code.
Allocates small buffers from larger blocks and/or caches deallocated buffers for later reuse...
kStatus kPoolAlloc_SetMaxCachedBufferSize(kPoolAlloc object, kSize size)
Sets the size limit for memory requests that can be cached upon deallocation.
Represents a boolean value.
kSize kPoolAlloc_CacheCapacity(kPoolAlloc object)
Returns the maximum total amount of memory that can be used to cache buffers upon deallocation...