Module helpers

Module helpers 

Source

Enumsยง

FindMetaBitResult
The result type for find meta bits functions.

Functionsยง

address_to_contiguous_meta_address ๐Ÿ”’
Performs address translation in contiguous metadata spaces (e.g. global and policy-specific in 64-bits, and global in 32-bits)
address_to_meta_address ๐Ÿ”’
Performs the translation of data address (data_addr) to metadata address for the specified metadata (metadata_spec).
align_metadata_address ๐Ÿ”’
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.
contiguous_meta_address_to_address ๐Ÿ”’
Performs reverse address translation from contiguous metadata bits to data addresses. The input address and bit shift should be aligned.
data_to_meta_size_round_up ๐Ÿ”’
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.
find_last_non_zero_bit ๐Ÿ”’
find_last_non_zero_bit_in_metadata_bits
find_last_non_zero_bit_in_metadata_bytes
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.
metadata_address_range_size ๐Ÿ”’
scan_non_zero_bits_in_metadata_bits
scan_non_zero_bits_in_metadata_bytes
scan_non_zero_bits_in_metadata_word ๐Ÿ”’
try_mmap_contiguous_metadata_space ๐Ÿ”’
Tries to mmap the metadata space (spec) for the specified data address range (start and size). Setting no_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.