Make LowMemoryNotification object allocated (#281)

* Make LowMemoryNotification object allocated

This makes a separate allocation for the callback object.  This makes
it easier for different callbacks to be used.

* Add reserve_with_leftover to address_space

The address_space now supports reserving for non-power of 2 allocations
and the space that is used for rounding up is retained by the
address_space.  This means that we can more tightly pack the allocators
internal objects.
This commit is contained in:
Matthew Parkinson
2021-02-23 14:51:44 +00:00
committed by GitHub
parent c082a331e2
commit 8840b386bc
4 changed files with 66 additions and 17 deletions

View File

@@ -58,7 +58,7 @@ void advance(PalNotificationObject* unused)
global_epoch++;
}
PalNotificationObject update_epoch = {nullptr, &advance};
PalNotificationObject update_epoch{&advance};
bool has_pressure()
{