diff options
author | Markus Wick <markus@selfnet.de> | 2021-06-05 11:47:08 +0200 |
---|---|---|
committer | Markus Wick <markus@selfnet.de> | 2021-06-11 17:27:06 +0200 |
commit | c4609c92eea30558473f02082733c7e59c2d2013 (patch) | |
tree | 892e5381d772333548b827f9b0b728907bb68cc6 /src/common/host_memory.h | |
parent | 621f3f5f47bf9619148cc0ab7ed315e05abf79d7 (diff) |
common/host_memory: Optimize for huge tables.
In theory, if we have 2 MB continously mapped, this should save one layer of TLB.
Let's make it at least more likely by aligning the memory.
Diffstat (limited to 'src/common/host_memory.h')
-rw-r--r-- | src/common/host_memory.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/host_memory.h b/src/common/host_memory.h index 98005df7a..eaa7d18ab 100644 --- a/src/common/host_memory.h +++ b/src/common/host_memory.h @@ -15,7 +15,7 @@ namespace Common { */ class HostMemory { public: - explicit HostMemory(size_t backing_size, size_t virtual_size); + explicit HostMemory(size_t backing_size_, size_t virtual_size_); ~HostMemory(); /** @@ -52,11 +52,15 @@ public: } private: + size_t backing_size{}; + size_t virtual_size{}; + // Low level handler for the platform dependent memory routines class Impl; std::unique_ptr<Impl> impl; u8* backing_base{}; u8* virtual_base{}; + size_t virtual_base_offset{}; }; } // namespace Common |