diff options
author | Andreas Kling <kling@serenityos.org> | 2021-07-12 22:52:17 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-13 22:40:25 +0200 |
commit | ba87571366ddae18d6d7659cf94cd44fe1e49519 (patch) | |
tree | 7b7206eb38854ace55fbffb742bbcc71c70b98de /Documentation/UsingQtCreator.md | |
parent | be83b3aff464e175bbe6800a4458a89e3f26e6b8 (diff) | |
download | serenity-ba87571366ddae18d6d7659cf94cd44fe1e49519.zip |
Kernel: Implement zone-based buddy allocator for physical memory
The previous allocator was very naive and kept the state of all pages
in one big bitmap. When allocating, we had to scan through the bitmap
until we found an unset bit.
This patch introduces a new binary buddy allocator that manages the
physical memory pages.
Each PhysicalRegion is divided into zones (PhysicalZone) of 16MB each.
Any extra pages at the end of physical RAM that don't fit into a 16MB
zone are turned into 15 or fewer 1MB zones.
Each zone starts out with one full-sized block, which is then
recursively subdivided into halves upon allocation, until a block of
the request size can be returned.
There are more opportunities for improvement here: the way zone objects
are allocated and stored is non-optimal. Same goes for the allocation
of buddy block state bitmaps.
Diffstat (limited to 'Documentation/UsingQtCreator.md')
0 files changed, 0 insertions, 0 deletions