IssueNo:#I3E0F2
Description:Delete VM to support only kernel mode. Sig:liteos_a Feature or Bugfix:Feature Binary Source:No Change-Id: Ie1029c8fbc0c1b85c138663933118d2d148b7769
This commit is contained in:
@@ -50,7 +50,11 @@ extern "C" {
|
||||
|
||||
/* Used to cut non-essential functions. */
|
||||
#define OS_MEM_FREE_BY_TASKID 0
|
||||
#ifdef LOSCFG_KERNEL_VM
|
||||
#define OS_MEM_EXPAND_ENABLE 1
|
||||
#else
|
||||
#define OS_MEM_EXPAND_ENABLE 0
|
||||
#endif
|
||||
|
||||
/* the dump size of current broken node when memcheck error */
|
||||
#define OS_MEM_NODE_DUMP_SIZE 64
|
||||
@@ -331,6 +335,17 @@ STATIC INLINE struct OsMemNodeHead *PreSentinelNodeGet(const VOID *pool, const s
|
||||
return NULL;
|
||||
}
|
||||
|
||||
UINT32 OsMemLargeNodeFree(const VOID *ptr)
|
||||
{
|
||||
LosVmPage *page = OsVmVaddrToPage((VOID *)ptr);
|
||||
if ((page == NULL) || (page->nPages == 0)) {
|
||||
return LOS_NOK;
|
||||
}
|
||||
LOS_PhysPagesFreeContiguous((VOID *)ptr, page->nPages);
|
||||
|
||||
return LOS_OK;
|
||||
}
|
||||
|
||||
STATIC INLINE BOOL TryShrinkPool(const VOID *pool, const struct OsMemNodeHead *node)
|
||||
{
|
||||
struct OsMemNodeHead *mySentinel = NULL;
|
||||
@@ -1976,17 +1991,6 @@ BOOL OsMemIsHeapNode(const VOID *ptr)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
UINT32 OsMemLargeNodeFree(const VOID *ptr)
|
||||
{
|
||||
LosVmPage *page = OsVmVaddrToPage((VOID *)ptr);
|
||||
if ((page == NULL) || (page->nPages == 0)) {
|
||||
return LOS_NOK;
|
||||
}
|
||||
LOS_PhysPagesFreeContiguous((VOID *)ptr, page->nPages);
|
||||
|
||||
return LOS_OK;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user