Memory pool initialization and deletion
|
LOS_MemInit
|
Initializes a dynamic memory pool of the required size.
|
LOS_MemDeInit
|
Deletes a memory pool. This function takes effect only when LOSCFG_MEM_MUL_POOL is enabled.
|
Dynamic memory application and free-up
|
LOS_MemAlloc
|
Applies for a memory block of the required size from a dynamic memory pool.
|
LOS_MemFree
|
Frees up the applied memory.
|
LOS_MemRealloc
|
Re-allocates a memory block of the required size and copies content from the original block. If the new memory block is successfully applied for, the original one will be freed up.
|
LOS_MemAllocAlign
|
Applies for a memory block of the required size whose address is aligned based on boundary, from a dynamic memory pool.
|
Memory pool information obtainment
|
LOS_MemPoolSizeGet
|
Obtains the total size of a dynamic memory pool.
|
LOS_MemTotalUsedGet
|
Obtains the total usage of a dynamic memory pool.
|
LOS_MemInfoGet
|
Obtains the structure of a memory pool, including the size of idle memory, size of used memory, number of idle memory blocks, number of used memory blocks, and maximum size of idle memory blocks.
|
LOS_MemPoolList
|
Prints information about all initialized memory pools in the system, including the start addresses of the memory pools, size of the memory pools, total size of idle memory, total size of used memory, maximum size of idle memory blocks, number of idle memory blocks, and number of used memory blocks. This function takes effect only when LOSCFG_MEM_MUL_POOL is enabled.
|
Memory block information obtainment
|
LOS_MemFreeBlksGet
|
Obtains the number of idle memory blocks in a memory pool.
|
LOS_MemUsedBlksGet
|
Obtains the number of used memory blocks in a memory pool.
|
LOS_MemTaskIdGet
|
Obtains the ID of the task to which a memory block is allocated.
|
LOS_MemLastUsedGet
|
Obtains the end address of the last used memory block in a memory pool.
|
LOS_MemNodeSizeCheck
|
Obtains the total size of a memory block and the size of idle memory in it. This function takes effect only when LOSCFG_BASE_MEM_NODE_SIZE_CHECK is enabled.
|
LOS_MemFreeNodeShow
|
Prints the size and number of idle memory blocks in a memory pool.
|
Memory pool integrity check
|
LOS_MemIntegrityCheck
|
Checks the integrity of a memory pool. This function takes effect only when LOSCFG_BASE_MEM_NODE_INTEGRITY_CHECK is enabled.
|
Sets and obtains the memory check level. This function takes effect only when LOSCFG_BASE_MEM_NODE_SIZE_CHECK is enabled.
|
LOS_MemCheckLevelSet
|
Sets the memory check level.
|
LOS_MemCheckLevelGet
|
Obtains the memory check level.
|
Dynamic memory application and free-up for a module (effective only when LOSCFG_MEM_MUL_MODULE is enabled)
|
LOS_MemMalloc
|
Takes memory out of a specified dynamic memory pool and allocates the memory to a specified module, and records the amount of memory allocated to the module.
|
LOS_MemMfree
|
Frees up a memory block that has been allocated to a specified module and records the amount of memory that is freed up.
|
LOS_MemMallocAlign
|
Applies for a memory block of the required size whose address is aligned based on boundary, from a dynamic memory pool, and records the amount of the applied memory.
|
LOS_MemMrealloc
|
Re-allocates a memory block of the required size and copies content from the original block, and records the amount of the re-allocated memory. If the new memory block is successfully applied for, the original one will be freed up.
|
Module memory usage obtainment
|
LOS_MemMusedGet
|
Obtains the memory usage of a module. This function takes effect only when LOSCFG_MEM_MUL_MODULE is enabled.
|