Module sft_map

Module sft_map 

Source

Modulesยง

dense_chunk_map ๐Ÿ”’
space_map ๐Ÿ”’
sparse_chunk_map ๐Ÿ”’

Structsยง

SFTRefStorage ๐Ÿ”’
The type we store SFT raw pointer as. It basically just double word sized atomic integer. This type provides an abstraction so we can access SFT easily.

Traitsยง

SFTMap
SFTMap manages the SFT table, and mapping between addresses with indices in the table. The trait allows us to have multiple implementations of the SFT table.

Functionsยง

create_sft_map ๐Ÿ”’

Type Aliasesยง

AtomicDoubleWord ๐Ÿ”’
We store raw pointer as a double word using atomics. We use portable_atomic. It provides non locking atomic operations where possible, and use a locking operation as the fallback. Rust only provides AtomicU128 for some platforms, and do not provide the type on x86_64-linux, as some earlier x86_64 CPUs do not have 128 bits atomic instructions. The crate portable_atomic works around the problem with a runtime detection to see if 128 bits atomic instructions are available.
DoubleWord ๐Ÿ”’
SFTRawPointer ๐Ÿ”’
The raw pointer for SFT. We expect a space to provide this to SFT map.