![]() |
CLA3P v0.3.1
Compact Linear Algebra Parallel Portable Package
|
Memory management utilities for numerical buffers. More...
Functions | |
| void * | cla3p::i2malloc (std::size_t size) |
| Default allocator for raw byte storage. | |
| void * | cla3p::i2calloc (std::size_t nmemb, std::size_t size) |
| Default zero-initializing allocator for raw byte storage. | |
| void * | cla3p::i2realloc (void *ptr, std::size_t size) |
| Resizes a previously allocated memory block. | |
| template<typename T_Elem> | |
| T_Elem * | cla3p::i_malloc_t (std::size_t nmemb) |
| Type-safe allocator for uninitialized storage. | |
| template<typename T_Elem> | |
| T_Elem * | cla3p::i_calloc_t (std::size_t nmemb) |
| Type-safe allocator for zero-initialized storage. | |
| template<typename T_Elem> | |
| T_Elem * | cla3p::i_realloc_t (T_Elem *ptr, std::size_t nmemb) |
| Type-safe reallocator for typed storage. | |
| void | cla3p::i_free (void *ptr) |
| Default deallocator for cla3p allocations. | |
Memory management utilities for numerical buffers.
Contains the internal and user-facing allocation routines used by CLA3P to ensure memory alignment and efficient data handling across different architectures.
| void * cla3p::i2malloc | ( | std::size_t | size | ) |
Default allocator for raw byte storage.
Allocates size bytes of uninitialized storage.
| [in] | size | The requested size in bytes. |
nullptr. | void * cla3p::i2calloc | ( | std::size_t | nmemb, |
| std::size_t | size ) |
Default zero-initializing allocator for raw byte storage.
Allocates nmemb objects of size bytes each and zero-initializes the memory.
| [in] | nmemb | The number of elements to allocate. |
| [in] | size | The size of each element in bytes. |
nullptr. | void * cla3p::i2realloc | ( | void * | ptr, |
| std::size_t | size ) |
Resizes a previously allocated memory block.
Reallocates the memory referenced by ptr to size bytes, preserving existing data up to the new size.
| [in] | ptr | Pointer to the memory block to resize (may be nullptr). |
| [in] | size | The new size of the allocation in bytes. |
nullptr. | T_Elem * cla3p::i_malloc_t | ( | std::size_t | nmemb | ) |
Type-safe allocator for uninitialized storage.
Allocates nmemb elements of type T_Elem without initialization.
| [in] | nmemb | The number of elements to allocate. |
nullptr. | T_Elem * cla3p::i_calloc_t | ( | std::size_t | nmemb | ) |
Type-safe allocator for zero-initialized storage.
Allocates nmemb elements of type T_Elem and initializes all bits to zero.
| [in] | nmemb | The number of elements to allocate. |
nullptr. | T_Elem * cla3p::i_realloc_t | ( | T_Elem * | ptr, |
| std::size_t | nmemb ) |
Type-safe reallocator for typed storage.
Resizes the memory block referenced by ptr to store nmemb elements of type T_Elem, preserving existing data up to the new size.
| [in] | ptr | Pointer to the memory block to resize (may be nullptr). |
| [in] | nmemb | The new number of elements requested. |
nullptr. | void cla3p::i_free | ( | void * | ptr | ) |
Default deallocator for cla3p allocations.
Releases memory previously allocated by i_malloc_t(), i_calloc_t(), or i_realloc_t().
| [in,out] | ptr | Pointer to the memory block to deallocate (may be nullptr). |