Skip to content

Commit

Permalink
Debugger: Reduce cost of small copy tracking.
Browse files Browse the repository at this point in the history
This uses another 400KB RAM and does a bit more writing, but makes lookups
faster.
  • Loading branch information
unknownbrackets committed Aug 31, 2023
1 parent 351de6e commit d5c91fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/Debugger/MemBlockInfo.cpp
Expand Up @@ -57,7 +57,7 @@ class MemSlabMap {
};

static constexpr uint32_t MAX_SIZE = 0x40000000;
static constexpr uint32_t SLICES = 16384;
static constexpr uint32_t SLICES = 65536;
static constexpr uint32_t SLICE_SIZE = MAX_SIZE / SLICES;

Slab *FindSlab(uint32_t addr);
Expand Down Expand Up @@ -371,7 +371,7 @@ void MemSlabMap::FillHeads(Slab *slab) {

void FlushPendingMemInfo() {
std::lock_guard<std::mutex> guard(pendingMutex);
for (auto info : pendingNotifies) {
for (const auto &info : pendingNotifies) {
if (info.flags & MemBlockFlags::ALLOC) {
allocMap.Mark(info.start, info.size, info.ticks, info.pc, true, info.tag);
} else if (info.flags & MemBlockFlags::FREE) {
Expand Down

0 comments on commit d5c91fa

Please sign in to comment.