46#define OS_MEM_ALIGN(p, alignSize) (((UINTPTR)(p) + (alignSize) - 1) & ~((UINTPTR)((alignSize) - 1)))
47#define OS_MEM_ALIGN_SIZE (sizeof(UINTPTR))
93#define MEM_MODULE_MAX 0x20
285#ifdef LOSCFG_MEM_TASK_STAT
296#define LOS_MEM_INIT_ATTR_SLAB_POS 0U
297#define LOS_MEM_INIT_ATTR_SLAB_MSK 1U
663#ifdef LOSCFG_BASE_MEM_NODE_SIZE_CHECK
718extern UINT32 LOS_MemCheckLevelSet(
UINT8 checkLevel);
745#define LOS_MEM_CHECK_LEVEL_LOW 0
753#define LOS_MEM_CHECK_LEVEL_HIGH 1
761#define LOS_MEM_CHECK_LEVEL_DISABLE 0xff
769#define LOS_MEM_CHECK_LEVEL_DEFAULT LOS_MEM_CHECK_LEVEL_DISABLE
779#define LOS_ERRNO_MEMCHECK_PARA_NULL LOS_ERRNO_OS_ERROR(LOS_MOD_MEM, 0x1)
789#define LOS_ERRNO_MEMCHECK_OUTSIDE LOS_ERRNO_OS_ERROR(LOS_MOD_MEM, 0x2)
799#define LOS_ERRNO_MEMCHECK_NO_HEAD LOS_ERRNO_OS_ERROR(LOS_MOD_MEM, 0x3)
809#define LOS_ERRNO_MEMCHECK_WRONG_LEVEL LOS_ERRNO_OS_ERROR(LOS_MOD_MEM, 0x4)
819#define LOS_ERRNO_MEMCHECK_DISABLED LOS_ERRNO_OS_ERROR(LOS_MOD_MEM, 0x5)
UINT32 LOS_MemTaskIdGet(const void *ptr)
Get the task ID of a used memory node.
void * LOS_MemMalloc(void *pool, UINT32 size, UINT32 moduleId)
Allocate dynamic memory.
void * LOS_MemAlloc(void *pool, UINT32 size)
Allocate dynamic memory.
UINT32 LOS_MemDeInit(void *pool)
Deinitialize dynamic memory.
UINT32 LOS_MemMfree(void *pool, void *ptr, UINT32 moduleId)
Free dynamic memory.
UINT32 LOS_MemPoolInit(void *pool, UINT32 size, UINT32 attr)
Initialize dynamic memory.
UINT32 LOS_MemMusedGet(UINT32 moduleId)
get the used memory size of the specified module.
UINT32 LOS_MemInit(void *pool, UINT32 size)
Initialize dynamic memory.
UINT32 LOS_MemIntegrityCheck(const void *pool)
Check the memory pool integrity.
UINT32 LOS_MemFree(void *pool, void *ptr)
Free dynamic memory.
UINT32 LOS_MemTotalUsedGet(void *pool)
Get the size of memory totally used.
void * LOS_MemMallocAlign(void *pool, UINT32 size, UINT32 boundary, UINT32 moduleId)
Allocate aligned memory.
void * LOS_MemMrealloc(void *pool, void *ptr, UINT32 size, UINT32 moduleId)
Re-allocate a memory block.
UINT32 LOS_MemPoolSizeGet(const void *pool)
Get the size of memory pool's size.
UINT32 LOS_MemInfoGet(void *pool, LOS_MEM_POOL_STATUS *poolStatus)
Get the information of memory pool.
UINTPTR LOS_MemLastUsedGet(void *pool)
Get the address of the next byte of the last used byte.
UINT32 LOS_MemFreeBlksGet(void *pool)
Get the number of free memory nodes.
void(* MALLOC_HOOK)(void)
Define the type of the customized tuning function when calling the API LOS_MemAlloc to allocate memor...
Definition los_memory.h:67
UINT32 LOS_MemFreeNodeShow(void *pool)
Get the number of free node in every size.
void * LOS_MemRealloc(void *pool, void *ptr, UINT32 size)
Re-allocate a memory block.
MALLOC_HOOK g_MALLOC_HOOK
UINT32 LOS_MemPoolList(void)
Print information about all pools.
UINT32 LOS_MemUsedBlksGet(void *pool)
Get the number of used memory nodes.
void * LOS_MemAllocAlign(void *pool, UINT32 size, UINT32 boundary)
Allocate aligned memory.
#define VOID
Definition los_typedef.h:88
unsigned char UINT8
Definition los_typedef.h:50
unsigned int UINTPTR
Definition los_typedef.h:74
unsigned int UINT32
Definition los_typedef.h:52
Definition los_memory.h:279
UINT32 uwUsedNodeNum
Definition los_memory.h:283
UINT32 uwTotalUsedSize
Definition los_memory.h:280
UINT32 uwTotalFreeSize
Definition los_memory.h:281
UINT32 uwFreeNodeNum
Definition los_memory.h:284
UINT32 uwMaxFreeNodeSize
Definition los_memory.h:282