Merge remote-tracking branch 'origin/main' into wow64

This commit is contained in:
momo5502
2025-10-25 11:06:03 +02:00
17 changed files with 303 additions and 51 deletions

View File

@@ -173,6 +173,7 @@ class module_manager
callbacks* callbacks_{};
module_map modules_{};
mutable module_map::iterator last_module_cache_{modules_.end()};
// Strategy pattern components
mapping_strategy_factory strategy_factory_;
@@ -198,6 +199,11 @@ class module_manager
module_map::iterator get_module(const uint64_t address)
{
if (last_module_cache_ != this->modules_.end() && last_module_cache_->second.contains(address))
{
return last_module_cache_;
}
if (this->modules_.empty())
{
return this->modules_.end();
@@ -213,6 +219,7 @@ class module_manager
if (upper_bound->second.contains(address))
{
last_module_cache_ = upper_bound;
return upper_bound;
}