PMSIS API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CL_L1 Memory allocation

Memory allocation in Cluster L1 memory. More...

Functions

void * pi_cl_l1_malloc (struct pi_device *device, uint32_t size)
 Allocate in Cluster L1 memory. More...
 
void pi_cl_l1_free (struct pi_device *device, void *chunk, int size)
 Free Cluster L1 memory. More...
 
void * pi_cl_l1_malloc_align (struct pi_device *device, int size, int align)
 Allocate in Cluster L1 memory. More...
 
void pi_cl_l1_malloc_dump (struct pi_device *device)
 Display free blocks. More...
 

Description

Function Documentation

void pi_cl_l1_free ( struct pi_device *  device,
void *  chunk,
int  size 
)

This can be called only when the speficied cluster is opened.

Parameters
deviceCluster device where to free memory.
chunkChunk to be freed.
sizeSize in bytes of the memory to be freed.
void* pi_cl_l1_malloc ( struct pi_device *  device,
uint32_t  size 
)

The allocated memory is 4-bytes aligned. The caller has to provide back the size of the allocated chunk when freeing it. This can be called only when the speficied cluster is opened.

Parameters
deviceCluster device where to allocate memory.
sizeSize in bytes of the memory to be allocated.
Returns
The allocated chunk or NULL if there was not enough memory available.
void* pi_cl_l1_malloc_align ( struct pi_device *  device,
int  size,
int  align 
)

The allocated memory is aligned on the specified number of bytes. The caller has to provide back the size of the allocated chunk when freeing it. This can be called only when the speficied cluster is opened.

Parameters
deviceCluster device where to allocate memory.
sizeSize in bytes of the memory to be allocated.
alignAlignment in bytes.
Returns
The allocated chunk or NULL if there was not enough memory available.
void pi_cl_l1_malloc_dump ( struct pi_device *  device)

This function can be used to display free blocks available from the CL L1 allocator.