提交 bc32a1ec 编写于 作者: K kenneth

fix: 修复los_vm_scan.c中内部函数OsInactiveListIsLow冗余代码

函数OsInactiveListIsLow()和InactiveListIsLow()代码重复,删除冗余代码。

close #I4HKFF
Signed-off-by: Nkenneth <zhushangyuan@huawei.com>
上级 07cab404
......@@ -285,11 +285,6 @@ int OsShrinkInactiveList(LosVmPhysSeg *physSeg, int nScan, LOS_DL_LIST *list)
return nrReclaimed;
}
bool InactiveListIsLow(LosVmPhysSeg *physSeg)
{
return (physSeg->lruSize[VM_LRU_ACTIVE_FILE] > physSeg->lruSize[VM_LRU_INACTIVE_FILE]) ? TRUE : FALSE;
}
#ifdef LOSCFG_FS_VFS
int OsTryShrinkMemory(size_t nPage)
{
......@@ -319,7 +314,7 @@ int OsTryShrinkMemory(size_t nPage)
continue;
}
if (InactiveListIsLow(physSeg)) {
if (OsInactiveListIsLow(physSeg)) {
OsShrinkActiveList(physSeg, (nPage < VM_FILEMAP_MIN_SCAN) ? VM_FILEMAP_MIN_SCAN : nPage);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册