Initial cut at a lazy decommit strategy.
This does not deallocate memory until the OS tells us that we are short on memory, then tries to decommit all of the cached chunks (except for the first page, used for the linked lists). Nowhere near enough testing to commit to master yet!
This commit is contained in:
committed by
David Chisnall
parent
7a9ce97166
commit
66cec23b23
@@ -10,7 +10,12 @@ namespace snmalloc
|
||||
Fresh = 0,
|
||||
Large,
|
||||
Medium,
|
||||
Super
|
||||
Super,
|
||||
/**
|
||||
* If the decommit policy is lazy, slabs are moved to this state when all
|
||||
* pages other than the first one have been decommitted.
|
||||
*/
|
||||
Decommitted
|
||||
};
|
||||
|
||||
class Baseslab
|
||||
|
||||
Reference in New Issue
Block a user