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

UserspaceEmulator: Add fast-path for is<MmapRegion>()

Don't use default RTTI for these since they are performance-sensitive.
This commit is contained in:
Andreas Kling 2021-03-09 15:17:15 +01:00
parent 656cd477c2
commit 82aea65bd3
4 changed files with 11 additions and 3 deletions

View file

@ -79,8 +79,11 @@ public:
Emulator& emulator() { return m_emulator; }
const Emulator& emulator() const { return m_emulator; }
template<typename T>
bool fast_is() const = delete;
protected:
Region(u32 base, u32 size);
Region(u32 base, u32 size, bool mmap = false);
void set_range(Range r) { m_range = r; };
private:
@ -88,6 +91,7 @@ private:
Range m_range;
bool m_mmap { false };
bool m_stack { false };
bool m_text { false };
bool m_readable { true };