forked from capablevms/cheri-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
From [review feedback from Laurie](capablevms#88 (comment)); thanks!
- Loading branch information
1 parent
6165f93
commit 9c09bab
Showing
1 changed file
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
# Compartmentalising Allocator | ||
|
||
A modification of the "bump allocator" in this repo. | ||
This allocator creates compartments on the heap, and returns capabilities | ||
to allocations within the compartment. | ||
A modification of the "bump allocator" in this repo. This allocator creates | ||
compartments on the heap, and returns capabilities to allocations within the | ||
compartment. | ||
|
||
Because allocations are made against a compartment's (previously `mmap`'d) | ||
buffer, we need to identify the compartment being used when we call `malloc`. | ||
`init_compartment` returns a capability used to identify the compartment it | ||
`init_compartment` returns a capability used to identify the compartment it | ||
creates; calls to `malloc_compartment` accept this identifier as a parameter. | ||
|
||
`main.c` shows a simple use, with allocations against two different | ||
compartments. | ||
|
||
Example is run using `make` in the typical fashion for the repo | ||
(i.e. along the lines of `make -f Makefile.morello-hybrid run-main`). | ||
Example is run using `make` in the typical fashion for the repo (i.e. along the | ||
lines of `make -f Makefile.morello-hybrid run-main`). | ||
|