os_units
This crate provides a data structure for byte size. With the
x86_64
crate, you can easily convert
the size of physical memory pages into bytes, and bytes into the number of physical memory
pages.
Examples
use Bytes;
use ;
let bytes_of_kernel = new;
let pages_of_kernel = bytes_of_kernel.;
assert_eq!;
let bytes_of_pages = pages_of_kernel.as_bytes;
assert_eq!;
License: MIT OR Apache-2.0