WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
los_memory.h 文件参考
#include "los_config.h"
#include "los_base.h"
#include "los_toolchain.h"
#include "los_membox.h"
los_memory.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

结构体

struct  LOS_MEM_POOL_STATUS
 

宏定义

#define OS_MEM_ALIGN(p, alignSize)   (((UINTPTR)(p) + (alignSize) - 1) & ~((UINTPTR)((alignSize) - 1)))
 
#define OS_MEM_ALIGN_SIZE   (sizeof(UINTPTR))
 
#define MEM_MODULE_MAX   0x20
 
#define LOS_MEM_INIT_ATTR_SLAB_POS   0U
 
#define LOS_MEM_INIT_ATTR_SLAB_MSK   1U /* << LOS_MEM_INIT_ATTR_SLAB_POS */
 
#define LOS_MEM_CHECK_LEVEL_LOW   0
 
#define LOS_MEM_CHECK_LEVEL_HIGH   1
 
#define LOS_MEM_CHECK_LEVEL_DISABLE   0xff
 
#define LOS_MEM_CHECK_LEVEL_DEFAULT   LOS_MEM_CHECK_LEVEL_DISABLE
 
#define LOS_ERRNO_MEMCHECK_PARA_NULL   LOS_ERRNO_OS_ERROR(LOS_MOD_MEM, 0x1)
 
#define LOS_ERRNO_MEMCHECK_OUTSIDE   LOS_ERRNO_OS_ERROR(LOS_MOD_MEM, 0x2)
 
#define LOS_ERRNO_MEMCHECK_NO_HEAD   LOS_ERRNO_OS_ERROR(LOS_MOD_MEM, 0x3)
 
#define LOS_ERRNO_MEMCHECK_WRONG_LEVEL   LOS_ERRNO_OS_ERROR(LOS_MOD_MEM, 0x4)
 
#define LOS_ERRNO_MEMCHECK_DISABLED   LOS_ERRNO_OS_ERROR(LOS_MOD_MEM, 0x5)
 

类型定义

typedef void(* MALLOC_HOOK) (void)
 Define the type of the customized tuning function when calling the API LOS_MemAlloc to allocate memory.
 

函数

void * LOS_MemMalloc (void *pool, UINT32 size, UINT32 moduleId)
 Allocate dynamic memory.
 
void * LOS_MemMallocAlign (void *pool, UINT32 size, UINT32 boundary, UINT32 moduleId)
 Allocate aligned memory.
 
UINT32 LOS_MemMfree (void *pool, void *ptr, UINT32 moduleId)
 Free dynamic memory.
 
void * LOS_MemMrealloc (void *pool, void *ptr, UINT32 size, UINT32 moduleId)
 Re-allocate a memory block.
 
UINT32 LOS_MemMusedGet (UINT32 moduleId)
 get the used memory size of the specified module.
 
UINT32 LOS_MemDeInit (void *pool)
 Deinitialize dynamic memory.
 
UINT32 LOS_MemPoolList (void)
 Print information about all pools.
 
UINT32 LOS_MemPoolInit (void *pool, UINT32 size, UINT32 attr)
 Initialize dynamic memory.
 
UINT32 LOS_MemInit (void *pool, UINT32 size)
 Initialize dynamic memory.
 
void * LOS_MemAlloc (void *pool, UINT32 size)
 Allocate dynamic memory.
 
UINT32 LOS_MemFree (void *pool, void *ptr)
 Free dynamic memory.
 
void * LOS_MemRealloc (void *pool, void *ptr, UINT32 size)
 Re-allocate a memory block.
 
void * LOS_MemAllocAlign (void *pool, UINT32 size, UINT32 boundary)
 Allocate aligned memory.
 
UINT32 LOS_MemPoolSizeGet (const void *pool)
 Get the size of memory pool's size.
 
UINT32 LOS_MemTotalUsedGet (void *pool)
 Get the size of memory totally used.
 
UINT32 LOS_MemFreeBlksGet (void *pool)
 Get the number of free memory nodes.
 
UINT32 LOS_MemUsedBlksGet (void *pool)
 Get the number of used memory nodes.
 
UINT32 LOS_MemTaskIdGet (const void *ptr)
 Get the task ID of a used memory node.
 
UINTPTR LOS_MemLastUsedGet (void *pool)
 Get the address of the next byte of the last used byte.
 
UINT32 LOS_MemInfoGet (void *pool, LOS_MEM_POOL_STATUS *poolStatus)
 Get the information of memory pool.
 
UINT32 LOS_MemFreeNodeShow (void *pool)
 Get the number of free node in every size.
 
UINT32 LOS_MemIntegrityCheck (const void *pool)
 Check the memory pool integrity.
 

变量

MALLOC_HOOK g_MALLOC_HOOK
 
UINT8m_aucSysMem0
 
UINT8m_aucSysMem1
 

宏定义说明

◆ LOS_MEM_INIT_ATTR_SLAB_MSK

#define LOS_MEM_INIT_ATTR_SLAB_MSK   1U /* << LOS_MEM_INIT_ATTR_SLAB_POS */

◆ OS_MEM_ALIGN

#define OS_MEM_ALIGN (   p,
  alignSize 
)    (((UINTPTR)(p) + (alignSize) - 1) & ~((UINTPTR)((alignSize) - 1)))

◆ OS_MEM_ALIGN_SIZE

#define OS_MEM_ALIGN_SIZE   (sizeof(UINTPTR))