Home
last modified time | relevance | path

Searched refs:bytes (Results 1 – 8 of 8) sorted by relevance

/DragonOS-0.1.9/kernel/src/libs/intertrait/src/
Dhasher.rs17 fn write(&mut self, bytes: &[u8]) { in write()
18 let mut bytes = bytes; in write() localVariable
19 while bytes.len() > size_of::<u64>() { in write()
20 let (u64_bytes, remaining) = bytes.split_at(size_of::<u64>()); in write()
22 bytes = remaining in write()
24 self.0 ^= bytes in write()
/DragonOS-0.1.9/docs/kernel/memory_management/
Dmmio.md158bytes,那么可以令$exp = n$。index与exp的换算公式如下:$index = exp - 12$。e.g. 一个大小为$2^{12}$ bytes的内存块,其$exp = 12$,…
/DragonOS-0.1.9/kernel/src/syscall/
Dmisc.rs43 sysinfo.totalram = mem.total().bytes() as u64; in sysinfo()
44 sysinfo.freeram = mem.free().bytes() as u64; in sysinfo()
/DragonOS-0.1.9/kernel/src/mm/allocator/
Dpage_frame.rs184 pub fn bytes(&self) -> usize { in bytes() method
191 pub fn from_bytes(bytes: usize) -> Option<Self> { in from_bytes()
192 if bytes & MMArch::PAGE_OFFSET_MASK != 0 { in from_bytes()
195 return Some(Self(bytes / MMArch::PAGE_SIZE)); in from_bytes()
Dbump.rs111 PhysPageFrame::new(start_paddr + count.bytes()), in ensure_early_mapping()
/DragonOS-0.1.9/kernel/src/mm/
Ducontext.rs339 .find_free_at(self.mmap_min, vaddr, page_count.bytes(), map_flags)? in mmap()
343 .find_free(self.mmap_min, page_count.bytes()) in mmap()
460 let to_unmap = VirtRegion::new(start_page.virt_address(), page_count.bytes()); in munmap()
512 let region = VirtRegion::new(start_page.virt_address(), page_count.bytes()); in mprotect()
1388 mut bytes: usize, in initial_extend()
1393 bytes = page_align_up(bytes); in initial_extend()
1394 self.mapped_size += bytes; in initial_extend()
1398 bytes, in initial_extend()
1422 mut bytes: usize, in extend()
1427 bytes = page_align_up(bytes); in extend()
[all …]
/DragonOS-0.1.9/kernel/src/arch/riscv64/mm/
Dinit.rs128 bump_allocator.usage().used().bytes() / 1024 in riscv_mm_init()
/DragonOS-0.1.9/kernel/src/filesystem/procfs/
Dmod.rs229 &mut format!("MemTotal:\t{} kB\n", usage.total().bytes() >> 10) in open_meminfo()
235 &mut format!("MemFree:\t{} kB\n", usage.free().bytes() >> 10) in open_meminfo()