Memory Management Class for "Memory Manager Lite". User can create only one instance.
More...
#include <Manager.h>
|
static err_t | initFirst (void *manager_area, uint32_t area_size) |
|
static err_t | initPerCpu (void *manager_area, uint32_t pool_num) |
|
static err_t | initPerCpu (void *manager_area, MemPool **static_pools[], uint8_t *pool_num, uint8_t *layout_no) |
|
static err_t | finalize () |
|
static err_t | createStaticPools (uint8_t sec_no, NumLayout layout_no, void *work_area, uint32_t area_size, const PoolSectionAttr *pool_attr) |
|
static err_t | createStaticPools (NumLayout layout_no, void *work_area, uint32_t area_size, const PoolAttr *pool_attr) |
|
static void | destroyStaticPools (uint8_t sec_no) |
|
static void | destroyStaticPools () |
|
static NumLayout | getCurrentLayoutNo (uint8_t sec_no) |
|
static bool | isStaticPoolAvailable (uint8_t sec_no) |
|
static uint32_t | getStaticPoolsUsedSegs (uint8_t sec, MemHandleBase *mhs, uint32_t num_mhs) |
|
static uint32_t | getUsedSegs (uint8_t sec, PoolId id, MemHandleBase *mhs, uint32_t num_mhs) |
|
static bool | isPoolAvailable (PoolId id) |
|
static PoolType | getPoolType (PoolId id) |
|
static PoolAddr | getPoolAddr (PoolId id) |
|
static PoolSize | getPoolSize (PoolId id) |
|
static NumSeg | getPoolNumSegs (PoolId id) |
|
static NumSeg | getPoolNumAvailSegs (PoolId id) |
|
Memory Management Class for "Memory Manager Lite". User can create only one instance.
◆ initFirst()
static err_t initFirst |
( |
void * |
manager_area, |
|
|
uint32_t |
area_size |
|
) |
| |
|
static |
The 1st initialize method on boot. This method only called once on the system.(from system processor)
- Parameters
-
[in] | manager_area | the area pointer of the data structure for management "memory manager". |
[in] | area_size | the size of the data structure for management "memory manager". |
- Returns
- ERR_OK : success
-
ERR_STS : error, initFirst() is already executing
-
ERR_DATA_SIZE : error, area_size less than sizeof(MemMgrLite::Manager)
-
ERR_ADR_ALIGN : error, address is not 4bytes alignment
◆ initPerCpu()
static err_t initPerCpu |
( |
void * |
manager_area, |
|
|
uint32_t |
pool_num |
|
) |
| |
|
static |
The 2nd initialize method on boot. This method only called once on each processor.
- Parameters
-
[in] | manager_area | The area pointer of the data structure for management "memory manager". |
- Returns
- ERR_OK : success
-
ERR_STS : error, initPerCpu() is already executing
◆ finalize()
static err_t finalize |
( |
| ) |
|
|
static |
The finalize method on power-off. This method only called once on the system.(from system processor)
- Returns
- void
◆ createStaticPools()
static err_t createStaticPools |
( |
uint8_t |
sec_no, |
|
|
NumLayout |
layout_no, |
|
|
void * |
work_area, |
|
|
uint32_t |
area_size, |
|
|
const PoolSectionAttr * |
pool_attr |
|
) |
| |
|
static |
The static memory layout creation method. This mathod provide changing memory layouts.
- Parameters
-
[in] | layout_no | A layout number. |
[in] | work_area | The area pointer of memory pools used by "memory manager" with layout number. |
[in] | area_size | The size of memory pools used by "memory manager" with layout number. |
- Returns
- ERR_OK : success
-
ERR_STS : error, initPerCpu() is already executing
-
ERR_ARG : error, layout_no is over max(NUM_MEM_LAYOUTS-1)
-
ERR_DATA_SIZE : error, area_size less than MEMMGR_MAX_WORK_SIZE
-
ERR_ADR_ALIGN : error, work area is not 4bytes alignment
◆ destroyStaticPools()
static void destroyStaticPools |
( |
uint8_t |
sec_no | ) |
|
|
static |
The static memory layout destroy method. This mathod provide clear the memory layout.
- Returns
- void
◆ getCurrentLayoutNo()
static NumLayout getCurrentLayoutNo |
( |
uint8_t |
sec_no | ) |
|
|
inlinestatic |
The getter method for layout number.
- Returns
- NumLayout The current layout number.
The documentation for this class was generated from the following file:
- spresense/sdk/modules/include/memutils/memory_manager/Manager.h