Enumsยง
- The result type for find meta bits functions.
Functionsยง
- Performs address translation in contiguous metadata spaces (e.g. global and policy-specific in 64-bits, and global in 32-bits)
- Performs the translation of data address (
data_addr
) to metadata address for the specified metadata (metadata_spec
). - Align an pair of a metadata address and a metadata bit offset to the start of this metadata value. For example, when the metadata is 4 bits, it should only start at bit 0 or bit 4. When the metadata is 16 bits, it should only start at bit 0, and its metadata address should be aligned to 2 bytes. This is important, as
contiguous_meta_address_to_address
can only convert the start address of metadata to the data address. - Performs reverse address translation from contiguous metadata bits to data addresses. The input address and bit shift should be aligned.
- Calculate the amount of metadata needed for the give amount of data memory, round up to nearest integer.
data_size
can be in any unit, e.g. bits, bytes, pages, blocks, chunks, etc., and the result has the same unit. - log_
data_ ๐meta_ ratio Return the base-2 logarithm of the ratio of data bits and metadata bits per region. - meta_
byte_ ๐lshift - meta_
byte_ ๐mask - meta_
to_ ๐data_ size Calculate the amount of data governed by the give amount of metadata.meta_size
can be in any unit, e.g. bits, bytes, pages, blocks, chunks, etc., and the result has the same unit. - Tries to mmap the metadata space (
spec
) for the specified data address range (start
andsize
). Settingno_reserve
to true means the function will only map address range, without reserving swap-space/physical memory. Returns the size in bytes that gets mmapped in the function if success.