mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:18:11 +00:00
UserspaceEmulator: Devirtualize read/write/execute region permissions
These are getting quite hot (~4% of general emulation profile combined) so let's just devirtualize them and turn the function calls into simple boolean checks.
This commit is contained in:
parent
f41b9946e2
commit
3c64cec4d7
3 changed files with 17 additions and 10 deletions
|
@ -50,8 +50,8 @@ NonnullOwnPtr<MmapRegion> MmapRegion::create_file_backed(u32 base, u32 size, u32
|
|||
|
||||
MmapRegion::MmapRegion(u32 base, u32 size, int prot)
|
||||
: Region(base, size)
|
||||
, m_prot(prot)
|
||||
{
|
||||
set_prot(prot);
|
||||
m_shadow_data = (u8*)malloc(size);
|
||||
memset(m_shadow_data, 1, size);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue