MCPcopy Create free account
hub / github.com/chyyuu/os_kernel_lab / dealloc

Method dealloc

os/src/task/id.rs:31–39  ·  view source on GitHub ↗
(&mut self, id: usize)

Source from the content-addressed store, hash-verified

29 }
30 }
31 pub fn dealloc(&mut self, id: usize) {
32 assert!(id < self.current);
33 assert!(
34 !self.recycled.iter().any(|i| *i == id),
35 "id {} has been deallocated!",
36 id
37 );
38 self.recycled.push(id);
39 }
40}
41
42lazy_static! {

Callers 2

dealloc_tidMethod · 0.45
dropMethod · 0.45

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected