File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,11 @@ use crate::structures::paging::{PageSize, PhysFrame};
44
55/// A trait for types that can allocate a frame of memory.
66///
7- /// This trait is unsafe to implement because the implementer must guarantee that
8- /// the `allocate_frame` method returns only unique unused frames.
7+ /// # Safety
8+ ///
9+ /// The implementer of this trait must guarantee that the `allocate_frame`
10+ /// method returns only unique unused frames. Otherwise, undefined behavior
11+ /// may result from two caller modifying or deallocating the same frame.
912pub unsafe trait FrameAllocator < S : PageSize > {
1013 /// Allocate a frame of the appropriate size and return it if possible.
1114 fn allocate_frame ( & mut self ) -> Option < PhysFrame < S > > ;
You can’t perform that action at this time.
0 commit comments