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:
David Chisnall
2019-02-20 16:34:50 +00:00
committed by David Chisnall
parent 7a9ce97166
commit 66cec23b23
9 changed files with 243 additions and 6 deletions

View File

@@ -13,6 +13,11 @@ namespace snmalloc
class PALLinux
{
public:
/**
* Flag indicating that this PAL does not support low pressure
* notifications.
*/
static constexpr bool supports_low_memory_notification = false;
static void error(const char* const str)
{
puts(str);