MCPcopy Create free account
hub / github.com/LibertyOS-Development/kernel / free

Method free

src/fs/bmapblk.rs:57–65  ·  view source on GitHub ↗

Free

(address: u32)

Source from the content-addressed store, hash-verified

55
56 // Free
57 pub fn free(address: u32)
58 {
59 let mut blk = Blk::read(BMapBlk::blkidx(address));
60 let bmap = blk.datamut();
61 let i = BMapBlk::buffidx(address);
62 bmap[i / 8].set_bit(i % 8, false);
63 blk.write();
64 crate::fs::sblk::alloc_count_down();
65 }
66
67 // Next free address
68 pub fn next_free_address() -> Option<u32>

Callers 2

memfreeFunction · 0.80
memusedFunction · 0.80

Calls 4

alloc_count_downFunction · 0.85
datamutMethod · 0.80
readFunction · 0.70
writeMethod · 0.45

Tested by

no test coverage detected