Don't derive Copy/Clone for Frame so we can be sure that it's free

If a Frame would be clonable or even Copy, the frame could be freed (e.g. passed to deallocate_frame) and used thereafter. Or it could be freed multiple times.
This commit is contained in:
Philipp Oppermann
2015-11-19 19:44:06 +01:00
parent c71981947b
commit a8600a00b6
3 changed files with 12 additions and 5 deletions

View File

@@ -4,7 +4,7 @@ mod area_frame_allocator;
pub const PAGE_SIZE: usize = 4096;
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)]
pub struct Frame {
number: usize,
}