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:
YOUR_NAME
2021-03-29 14:30:09 +08:00
parent 23c2c270b8
commit c959d43684
40 changed files with 378 additions and 160 deletions

View File

@@ -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
}