mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-30 00:23:24 +00:00
Use pointer metadata for page metadata
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
cd22854f59
commit
60365a818a
@ -1,9 +1,10 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use crate::{
|
||||
impl_page_meta,
|
||||
mm::{
|
||||
kspace::kvirt_area::{KVirtArea, Tracked},
|
||||
page::{allocator, meta::KernelStackMeta},
|
||||
page::allocator,
|
||||
page_prop::{CachePolicy, PageFlags, PageProperty, PrivilegedPageFlags},
|
||||
PAGE_SIZE,
|
||||
},
|
||||
@ -34,6 +35,11 @@ pub struct KernelStack {
|
||||
has_guard_page: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
struct KernelStackMeta {}
|
||||
|
||||
impl_page_meta!(KernelStackMeta);
|
||||
|
||||
impl KernelStack {
|
||||
/// Generates a kernel stack with guard pages.
|
||||
/// 4 additional pages are allocated and regarded as guard pages, which should not be accessed.
|
||||
|
Reference in New Issue
Block a user