mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
UserspaceEmulator: Implement a proper VM allocator
This patch brings Kernel::RangeAllocator to UserspaceEmulator in a slightly simplified form. It supports the basic three allocation types needed by virt$mmap(): allocate_anywhere, allocate_specific, and allocate_randomized. Porting virt$mmap() and virt$munmap() to use the allocator makes UE work correctly once again. :^)
This commit is contained in:
parent
9dacd7c0ec
commit
89483a9408
10 changed files with 438 additions and 36 deletions
|
@ -31,8 +31,7 @@ namespace UserspaceEmulator {
|
|||
|
||||
Region::Region(u32 base, u32 size)
|
||||
: m_emulator(Emulator::the())
|
||||
, m_base(base)
|
||||
, m_size(size)
|
||||
, m_range(Range { VirtualAddress { base }, size })
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue