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

Function mntmem

src/fs/blkdev.rs:238–246  ·  view source on GitHub ↗

Mount memory

()

Source from the content-addressed store, hash-verified

236
237// Mount memory
238pub fn mntmem()
239{
240 // Allocate half of available memory
241 let memory = crate::allocator::memsize() / 2;
242 let len = memory / crate::fs::ata::BLKSIZE;
243 let device = MemBlkDev::new(len);
244
245 *BLKDEV.lock() = Some(BlkDev::MEM(device));
246}
247
248
249// Whether or not drive has been mounted

Callers

nothing calls this directly

Calls 2

lockMethod · 0.80
memsizeFunction · 0.50

Tested by

no test coverage detected