结构体 | |
struct | tagMEMBOX_NODE |
struct | LOS_MEMBOX_INFO |
类型定义 | |
typedef struct tagMEMBOX_NODE | LOS_MEMBOX_NODE |
函数 | |
UINT32 | LOS_MemboxInit (VOID *pool, UINT32 poolSize, UINT32 blkSize) |
Initialize a memory pool. 更多... | |
VOID * | LOS_MemboxAlloc (VOID *pool) |
Request a memory block. 更多... | |
UINT32 | LOS_MemboxFree (VOID *pool, VOID *box) |
Free a memory block. 更多... | |
VOID | LOS_MemboxClr (VOID *pool, VOID *box) |
Clear a memory block. 更多... | |
VOID | LOS_ShowBox (VOID *pool) |
show membox info. 更多... | |
UINT32 | LOS_MemboxStatisticsGet (const VOID *boxMem, UINT32 *maxBlk, UINT32 *blkCnt, UINT32 *blkSize) |
calculate membox information. 更多... | |
typedef struct tagMEMBOX_NODE LOS_MEMBOX_NODE |
Structure of a free node in a memory pool
VOID * LOS_MemboxAlloc | ( | VOID * | pool | ) |
Request a memory block.
pool | [IN] Memory pool address. |
#VOID* | The request is accepted, and return a memory block address. |
#NULL | The request fails. |
Request a memory block.
在文件 los_membox.c 第 150 行定义.
VOID LOS_MemboxClr | ( | VOID * | pool, |
VOID * | box | ||
) |
Clear a memory block.
pool | [IN] Memory pool address. |
box | [IN] Memory block address. |
VOID |
Clear a memory block.
在文件 los_membox.c 第 201 行定义.
UINT32 LOS_MemboxFree | ( | VOID * | pool, |
VOID * | box | ||
) |
Free a memory block.
pool | [IN] Memory pool address. |
box | [IN] Memory block address. |
#LOS_NOK | This memory block fails to be freed. |
#LOS_OK | This memory block is successfully freed. |
Free a memory block.
在文件 los_membox.c 第 174 行定义.
Initialize a memory pool.
pool | [IN] Memory pool address. |
poolSize | [IN] Memory pool size. |
blkSize | [IN] Memory block size. |
#LOS_NOK | The memory pool fails to be initialized. |
#LOS_OK | The memory pool is successfully initialized. |
Initialize a memory pool.
在文件 los_membox.c 第 106 行定义.
UINT32 LOS_MemboxStatisticsGet | ( | const VOID * | boxMem, |
UINT32 * | maxBlk, | ||
UINT32 * | blkCnt, | ||
UINT32 * | blkSize | ||
) |
calculate membox information.
boxMem | [IN] Type #VOID* Pointer to the calculate membox. |
maxBlk | [OUT] Type UINT32* Record membox max block. |
blkCnt | [OUT] Type UINT32* Record membox block count alreay allocated. |
blkSize | [OUT] Type UINT32* Record membox block size. |
#LOS_OK | The heap status calculate success. |
#LOS_NOK | The membox status calculate with some error. |
calculate membox information.
在文件 los_membox.c 第 241 行定义.
VOID LOS_ShowBox | ( | VOID * | pool | ) |
show membox info.
pool | [IN] Memory pool address. |
VOID |
打印指定静态内存池所有节点信息(打印等级是LOS_INFO_LEVEL),包括内存池起始地址、 内存块大小、总内存块数量、每个空闲内存块的起始地址、所有内存块的起始地址
在文件 los_membox.c 第 214 行定义.