Memory pool for pooled memory manager. More...
#include "kzc_memory_common.h"#include <system/kzs_types.h>#include <system/debug/kzs_error.h>#include <system/kzs_header.h>Functions | |
| kzsError | kzcMemoryManagerCreatePool (const struct KzcMemoryManager *parentManager, kzUint poolIndex, kzSizeT poolSize, kzSizeT minimumEmptySize, struct KzcMemoryPool **out_pool) |
| Creates a new memory pool. More... | |
| kzsException | kzcMemoryManagerDeletePool (struct KzcMemoryPool *pool) |
| Deletes a memory pool. More... | |
| kzsError | kzcMemoryPoolAlloc (struct KzcMemoryPool *pool, kzSizeT size, void **out_pointer MEMORY_MANAGER_DEBUG_PARAM_PRIVATE(kzString description)) |
| Allocates given amount of memory from the pool. More... | |
| kzsError | kzcMemoryPoolFree (struct KzcMemoryPool *pool, void *pointer) |
| Frees the memory of the given pointer. More... | |
| kzSizeT | kzcMemoryPoolGetMaximumAvailableSize (const struct KzcMemoryPool *pool) |
| Returns the maximum continuous size of memory that can be allocated. More... | |
| kzBool | kzcMemoryPoolIsPointerInRange (const struct KzcMemoryPool *pool, const void *pointer) |
| Checks if the given pointer is located within the memory range of this pool. More... | |
| void | kzcMemoryPoolDump (const struct KzcMemoryPool *pool, kzBool memoryMap, kzBool sortBySize) |
| Dumps the internal state of the memory pool to log. More... | |
Memory pool for pooled memory manager.
Copyright 2008-2020 by Rightware. All rights reserved.
| kzsError kzcMemoryManagerCreatePool | ( | const struct KzcMemoryManager * | parentManager, |
| kzUint | poolIndex, | ||
| kzSizeT | poolSize, | ||
| kzSizeT | minimumEmptySize, | ||
| struct KzcMemoryPool ** | out_pool | ||
| ) |
Creates a new memory pool.
| kzsException kzcMemoryManagerDeletePool | ( | struct KzcMemoryPool * | pool | ) |
Deletes a memory pool.
| kzsError kzcMemoryPoolAlloc | ( | struct KzcMemoryPool * | pool, |
| kzSizeT | size, | ||
| void **out_pointer | MEMORY_MANAGER_DEBUG_PARAM_PRIVATEkzString description | ||
| ) |
Allocates given amount of memory from the pool.
| kzsError kzcMemoryPoolFree | ( | struct KzcMemoryPool * | pool, |
| void * | pointer | ||
| ) |
Frees the memory of the given pointer.
| kzSizeT kzcMemoryPoolGetMaximumAvailableSize | ( | const struct KzcMemoryPool * | pool | ) |
Returns the maximum continuous size of memory that can be allocated.
| kzBool kzcMemoryPoolIsPointerInRange | ( | const struct KzcMemoryPool * | pool, |
| const void * | pointer | ||
| ) |
Checks if the given pointer is located within the memory range of this pool.
| void kzcMemoryPoolDump | ( | const struct KzcMemoryPool * | pool, |
| kzBool | memoryMap, | ||
| kzBool | sortBySize | ||
| ) |
Dumps the internal state of the memory pool to log.
If sortBySize is KZ_TRUE, all memory allocations will be listed in smallest to largest order. If not, the order is the order in memory.