mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:47:46 +00:00
UserspaceEmulator: Add a page-address-to-MMU-region lookup map
To make SoftMMU::find_region() O(1), this patch invests 3MiB into a lookup table where we track each possible page base address and map them to the SoftMMU::Region corresponding to that address. This is another large improvement to general emulation performance. :^)
This commit is contained in:
parent
a4a389156d
commit
59b4874443
2 changed files with 16 additions and 5 deletions
|
@ -125,6 +125,8 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
Region* m_page_to_region_map[786432];
|
||||
|
||||
OwnPtr<Region> m_tls_region;
|
||||
NonnullOwnPtrVector<Region> m_regions;
|
||||
HashMap<int, Region*> m_shbuf_regions;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue