mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-27 11:23:25 +00:00
Fix multiple issues pointed out by the new compiler
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
5f2bd9d0ac
commit
9e4257b655
@ -26,13 +26,6 @@ pub struct KernelStack {
|
||||
}
|
||||
|
||||
impl KernelStack {
|
||||
pub fn new() -> Result<Self> {
|
||||
Ok(Self {
|
||||
segment: FrameAllocOptions::new(STACK_SIZE_IN_PAGES as usize).alloc_contiguous()?,
|
||||
has_guard_page: false,
|
||||
})
|
||||
}
|
||||
|
||||
/// Generates a kernel stack with a guard page.
|
||||
/// An additional page is allocated and be regarded as a guard page, which should not be accessed.
|
||||
pub fn new_with_guard_page() -> Result<Self> {
|
||||
|
Reference in New Issue
Block a user