提交 71144b4a 编写于 作者: O openharmony_ci 提交者: Gitee

!63 【轻量级 PR】:update kernel/base/vm/los_vm_phys.c.

Merge pull request !63 from 冷钦街/N/A
......@@ -339,8 +339,7 @@ VOID OsVmPhysPagesFree(LosVmPage *page, UINT8 order)
VOID OsVmPhysPagesFreeContiguous(LosVmPage *page, size_t nPages)
{
paddr_t pa;
UINT32 order;
size_t count;
UINT32 order;
size_t n;
while (TRUE) {
......@@ -355,10 +354,11 @@ VOID OsVmPhysPagesFreeContiguous(LosVmPage *page, size_t nPages)
page += n;
}
for (count = 0; count < nPages; count += n) {
while (nPages > 0) {
order = LOS_HighBitGet(nPages);
n = VM_ORDER_TO_PAGES(order);
OsVmPhysPagesFree(page, order);
nPages -= n;
page += n;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册