diff options
author | Tom <tomut@yahoo.com> | 2020-09-02 22:57:09 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-01 23:43:44 +0100 |
commit | bc5d6992a44be838c225bfd88be0aa4f978ddd66 (patch) | |
tree | 14f0033c064b5bcbc3c5fe9d2bf5cae262f84534 /Kernel/Heap | |
parent | cf2c215defd448ca44523143827e3ba022f8dd71 (diff) | |
download | serenity-bc5d6992a44be838c225bfd88be0aa4f978ddd66.zip |
Kernel: Memory purging improvements
This adds the ability for a Region to define volatile/nonvolatile
areas within mapped memory using madvise(). This also means that
memory purging takes into account all views of the PurgeableVMObject
and only purges memory that is not needed by all of them. When calling
madvise() to change an area to nonvolatile memory, return whether
memory from that area was purged. At that time also try to remap
all memory that is requested to be nonvolatile, and if insufficient
pages are available notify the caller of that fact.
Diffstat (limited to 'Kernel/Heap')
-rw-r--r-- | Kernel/Heap/SlabAllocator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Heap/SlabAllocator.cpp b/Kernel/Heap/SlabAllocator.cpp index d8f8210752..a306537ca9 100644 --- a/Kernel/Heap/SlabAllocator.cpp +++ b/Kernel/Heap/SlabAllocator.cpp @@ -130,7 +130,7 @@ static SlabAllocator<32> s_slab_allocator_32; static SlabAllocator<64> s_slab_allocator_64; static SlabAllocator<128> s_slab_allocator_128; -static_assert(sizeof(Region) <= s_slab_allocator_64.slab_size()); +static_assert(sizeof(Region) <= s_slab_allocator_128.slab_size()); template<typename Callback> void for_each_allocator(Callback callback) |