Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/structures/paging/frame_alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ pub unsafe trait FrameAllocator<S: PageSize> {

/// A trait for types that can deallocate a frame of memory.
pub trait FrameDeallocator<S: PageSize> {
/// Deallocate the given frame of memory.
fn deallocate_frame(&mut self, frame: PhysFrame<S>);
/// Deallocate the given unused frame.
///
/// ## Safety
///
/// The caller must ensure that the passed frame is unused.
unsafe fn deallocate_frame(&mut self, frame: PhysFrame<S>);
}

/// Represents a physical frame that is not used for any mapping.
Expand Down