diff --git a/src/common/heap_tracker.cpp b/src/common/heap_tracker.cpp index c147c279bd..6e5c3193da 100644 --- a/src/common/heap_tracker.cpp +++ b/src/common/heap_tracker.cpp @@ -168,8 +168,7 @@ void HeapTracker::SplitHeapMap(VAddr offset, size_t size) { } void HeapTracker::SplitHeapMapLocked(VAddr offset) { - auto it = this->GetNearestHeapMapLocked(offset); - if (it != m_mappings.end() && it->first != offset) { + if (auto it = this->GetNearestHeapMapLocked(offset); it != m_mappings.end() && it->first != offset) { // Adjust left iterator auto const orig_size = it->second.size; auto const left_size = offset - it->first; diff --git a/src/common/heap_tracker.h b/src/common/heap_tracker.h index 14b5401c18..3bdb499d31 100644 --- a/src/common/heap_tracker.h +++ b/src/common/heap_tracker.h @@ -7,7 +7,7 @@ #include #include -#include +#include #include "common/host_memory.h" namespace Common { @@ -35,10 +35,12 @@ public: private: // TODO: You may want to "fake-map" the first 2GB of 64-bit address space // and dedicate it entirely to a recursive PTE mapping :) - // However Ankerl is way better than using an RB tree, in all senses - using AddrTree = ankerl::unordered_dense::map; + // However Ankerl would be way better than using an RB tree, in all senses - but + // there is a strict requirement for ordering to be imposed accross the map itself + // which is not achievable with the unordered property. + using AddrTree = boost::container::map; AddrTree m_mappings; - using TicksTree = ankerl::unordered_dense::map; + using TicksTree = boost::container::map; TicksTree m_resident_mappings; private: void SplitHeapMap(VAddr offset, size_t size);