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

Method new

os/src/task/id.rs:17–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15
16impl RecycleAllocator {
17 pub fn new() -> Self {
18 RecycleAllocator {
19 current: 0,
20 recycled: Vec::new(),
21 }
22 }
23 pub fn alloc(&mut self) -> usize {
24 if let Some(id) = self.recycled.pop() {
25 id

Callers

nothing calls this directly

Calls 3

alloc_user_resMethod · 0.80
alloc_tidMethod · 0.45

Tested by

no test coverage detected