Refactor interface between backend and frontend (#530)
* Rename to use Config, rather than StateHandle/Globals/Backend * Make Backend a type on Config that contains the address space management implementation * Make Ranges part of the Backend configuration, so we can reuse code for different ways of managing memory * Pull the common chains of range definitions into separate files for reuse. * Move PagemapEntry to CommonConfig * Expose Pagemap through backend, so frontend doesn't see Pagemap directly * Remove global Pal and use DefaultPal, where one is not pass explicitly. Co-authored-by: David Chisnall <davidchisnall@users.noreply.github.com> Co-authored-by: Nathaniel Filardo <105816689+nwf-msr@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
1b8aa6bc0d
commit
03c9da6aa4
@@ -78,7 +78,7 @@ Exciting, no?
|
||||
|
||||
### Decoding a MetaEntry
|
||||
|
||||
The centerpiece of `snmalloc`'s metadata is its `PageMap`, which associates each "chunk" of the address space (~16KiB; see `MIN_CHUNK_BITS`) with a `MetaEntry`.
|
||||
The centerpiece of `snmalloc`'s metadata is its `Pagemap`, which associates each "chunk" of the address space (~16KiB; see `MIN_CHUNK_BITS`) with a `MetaEntry`.
|
||||
A `MetaEntry` is a pair of pointers, suggestively named `meta` and `remote_and_sizeclass`.
|
||||
In more detail, `MetaEntry`s are better represented by Sigma and Pi types, all packed into two pointer-sized words in ways that preserve pointer provenance on CHERI.
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@ In future architectures, this is increasingly likely to be a no-op.
|
||||
|
||||
## Backend-Provided Operations
|
||||
|
||||
* `CapPtr<T, Bout> capptr_domesticate(Backend::LocalState *, CapPtr<T, Bin> ptr)` allows the backend to test whether `ptr` is sensible, by some definition thereof.
|
||||
* `CapPtr<T, Bout> capptr_domesticate(LocalState *, CapPtr<T, Bin> ptr)` allows the backend to test whether `ptr` is sensible, by some definition thereof.
|
||||
The annotation `Bout` is *computed* as a function of `Bin`.
|
||||
`Bin` is required to be `Wild`, and `Bout` is `Tame` but otherwise identical.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user