1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:27:34 +00:00

UserspaceEmulator: Convert backing storage from malloc to mmap

This saves a few bytes for each guest-mmaped region, especially since these are likely to be page-aligned.
This commit is contained in:
Ben Wiederhake 2021-03-07 21:39:06 +01:00 committed by Andreas Kling
parent 968ad0f8d1
commit 7cc8f20a30
3 changed files with 28 additions and 16 deletions

View file

@ -64,7 +64,7 @@ public:
const String& name() const { return m_name; }
private:
MmapRegion(u32 base, u32 size, int prot);
MmapRegion(u32 base, u32 size, int prot, u8* data, u8* shadow_data);
u8* m_data { nullptr };
u8* m_shadow_data { nullptr };