SysLink API Reference
2.21.00.03
|
Memory manager interface definitions.
This abstracts the Memory management interface to be used with SysLink code. Allocation, Freeing-up, copy and address translate are supported for the memory management.
#include <ti/syslink/utils/MemoryDefs.h>
#include <ti/syslink/utils/MemoryOS.h>
#include <ti/syslink/utils/_Memory.h>
#include <ti/syslink/utils/IHeap.h>
Go to the source code of this file.
Macros | |
#define | Memory_Q_BLOCKING 1 |
Blocking quality Heaps with this "quality" may cause the calling thread to block; i.e., suspend execution until another thread leaves the gate. | |
#define | Memory_copy MemoryOS_copy |
Copies the data between memory areas. | |
#define | Memory_set MemoryOS_set |
Set the specific value in the said memory area. |
Functions | |
Ptr | Memory_alloc (IHeap_Handle heap, SizeT size, SizeT align, Ptr eb) |
Allocates the specified number of bytes. | |
Ptr | Memory_calloc (IHeap_Handle heap, SizeT size, SizeT align, Ptr eb) |
Allocates the specified number of bytes and memory is set to zero. | |
Void | Memory_free (IHeap_Handle heap, Ptr block, SizeT size) |
Frees up the specified chunk of memory. | |
Void | Memory_getStats (IHeap_Handle heap, Memory_Stats *stats) |
Function to obtain statistics from a heap. | |
Bool | Memory_query (IHeap_Handle heap, Int qual) |
Function to test for a particular IHeap quality. | |
SizeT | Memory_getMaxDefaultTypeAlign (Void) |
Function to get memory alignment. | |
Ptr | Memory_valloc (IHeap_Handle heap, SizeT size, SizeT align, Char value, Ptr eb) |
Allocates the specified number of bytes and memory is set to the specified value. |
#define Memory_Q_BLOCKING 1 |
Blocking quality Heaps with this "quality" may cause the calling thread to block; i.e., suspend execution until another thread leaves the gate.
#define Memory_copy MemoryOS_copy |
Copies the data between memory areas.
#define Memory_set MemoryOS_set |
Set the specific value in the said memory area.
Ptr Memory_alloc | ( | IHeap_Handle | heap, |
SizeT | size, | ||
SizeT | align, | ||
Ptr | eb | ||
) |
Allocates the specified number of bytes.
heap | Handle to the heap from which the memory is to be allocated. Specify NULL to allocate from local memory. |
size | Amount of memory to be allocated. |
align | Alignment constraints (power of 2) |
eb | Not used. Pass as NULL. |
Pointer | Success: Pointer to allocated buffer |
NULL | Failed to allocate memory |
Ptr Memory_calloc | ( | IHeap_Handle | heap, |
SizeT | size, | ||
SizeT | align, | ||
Ptr | eb | ||
) |
Allocates the specified number of bytes and memory is set to zero.
heap | Handle to the heap from which the memory is to be allocated. Specify NULL to allocate from local memory. |
size | Amount of memory to be allocated. |
align | Alignment constraints (power of 2) |
eb | Not used. Pass as NULL. |
Pointer | Success: Pointer to allocated buffer |
NULL | Failed to allocate memory |
Void Memory_free | ( | IHeap_Handle | heap, |
Ptr | block, | ||
SizeT | size | ||
) |
Frees up the specified chunk of memory.
heap | Handle to the heap |
block | Block of memory to be freed |
size | Amount of memory to be freed |
Void Memory_getStats | ( | IHeap_Handle | heap, |
Memory_Stats * | stats | ||
) |
Function to obtain statistics from a heap.
heap | Handle to the heap |
stats | Pointer to the Memory stats structure to be filled. |
Bool Memory_query | ( | IHeap_Handle | heap, |
Int | qual | ||
) |
Function to test for a particular IHeap quality.
heap | Handle to the heap |
qual | Quality to be queried. |
Function to get memory alignment.
Alignment | Maximum default alignment |
Allocates the specified number of bytes and memory is set to the specified value.
heap | Handle to the heap from which the memory is to be allocated. Specify NULL to allocate from local memory. |
size | Amount of memory to be allocated. |
align | Alignment constraints (power of 2) |
value | Value to be set for all bytes in the buffer |
eb | Not used. Pass as NULL. |
Pointer | Success: Pointer to allocated buffer |
NULL | Failed to allocate memory |