1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 15:07:45 +00:00

UserspaceEmulator: Keep Emulator& closer to the action in some places

This avoids the cost of calling Emulator::the() in some very hot paths.
This commit is contained in:
Andreas Kling 2020-11-16 14:39:05 +01:00
parent d14695f823
commit 1965fc5b98
9 changed files with 127 additions and 70 deletions

View file

@ -36,10 +36,13 @@
namespace UserspaceEmulator {
class Emulator;
class SharedBufferRegion;
class SoftMMU {
public:
explicit SoftMMU(Emulator&);
ValueWithShadow<u8> read8(X86::LogicalAddress);
ValueWithShadow<u16> read16(X86::LogicalAddress);
ValueWithShadow<u32> read32(X86::LogicalAddress);
@ -80,6 +83,8 @@ public:
}
private:
Emulator& m_emulator;
Region* m_page_to_region_map[786432];
OwnPtr<Region> m_tls_region;