[heap_tracker] fix map ordering violations

Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
lizzie 2025-08-31 16:37:17 +00:00
parent 4b5a8e0621
commit 7b89530528
No known key found for this signature in database
GPG key ID: 00287378CADCAB13
2 changed files with 7 additions and 6 deletions

View file

@ -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;