fix(os): fix kstack leak issues
The kstack_id is not recycled when KernelStack is dropped, which leads to kstack leak issue. Ch8 branch, and branches after that, are also affected by this issue. Signed-off-by: Xuewei Niu <justxuewei@apache.org>
This commit is contained in:
parent
7a74f84073
commit
1df9c1a98d
1 changed files with 1 additions and 0 deletions
|
@ -87,6 +87,7 @@ impl Drop for KernelStack {
|
||||||
KERNEL_SPACE
|
KERNEL_SPACE
|
||||||
.exclusive_access()
|
.exclusive_access()
|
||||||
.remove_area_with_start_vpn(kernel_stack_bottom_va.into());
|
.remove_area_with_start_vpn(kernel_stack_bottom_va.into());
|
||||||
|
KSTACK_ALLOCATOR.exclusive_access().dealloc(self.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue