================ @@ -0,0 +1,54 @@ +//===-- MemoryRegionInfoCache.cpp -----------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "lldb/Target/MemoryRegionInfoCache.h" +#include "lldb/Core/AddressRange.h" +#include "lldb/Target/MemoryRegionInfo.h" +#include "lldb/Target/Process.h" +#include "lldb/Utility/Status.h" + +#include "lldb/Utility/LLDBLog.h" +#include "lldb/Utility/Log.h" + +using namespace lldb; +using namespace lldb_private; + +void MemoryRegionInfoCache::Clear() { m_region_infos.Clear(); } + +void MemoryRegionInfoCache::Flush(addr_t load_addr, addr_t size) { + m_region_infos.Erase(load_addr, size); + m_region_infos.Sort(); ---------------- felipepiovezan wrote:
why is sorting needed? If it's already sorted, erasing preserves that property https://github.com/llvm/llvm-project/pull/202509 _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
