summaryrefslogtreecommitdiff
path: root/Userland/DevTools/UserspaceEmulator/MallocTracer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/DevTools/UserspaceEmulator/MallocTracer.cpp')
-rw-r--r--Userland/DevTools/UserspaceEmulator/MallocTracer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/DevTools/UserspaceEmulator/MallocTracer.cpp b/Userland/DevTools/UserspaceEmulator/MallocTracer.cpp
index 501d17c9af..4f00c21c52 100644
--- a/Userland/DevTools/UserspaceEmulator/MallocTracer.cpp
+++ b/Userland/DevTools/UserspaceEmulator/MallocTracer.cpp
@@ -68,7 +68,7 @@ void MallocTracer::target_did_malloc(Badge<Emulator>, FlatPtr address, size_t si
}));
auto& malloc_data = *mmap_region.malloc_metadata();
- bool is_chunked_block = malloc_data.chunk_size <= size_classes[size_classes.size() - 1];
+ bool is_chunked_block = malloc_data.chunk_size <= size_classes[num_size_classes - 1];
if (is_chunked_block)
malloc_data.mallocations.resize((ChunkedBlock::block_size - sizeof(ChunkedBlock)) / malloc_data.chunk_size);
else
@@ -92,7 +92,7 @@ ALWAYS_INLINE Mallocation* MallocRegionMetadata::mallocation_for_address(FlatPtr
ALWAYS_INLINE Optional<size_t> MallocRegionMetadata::chunk_index_for_address(FlatPtr address) const
{
- bool is_chunked_block = chunk_size <= size_classes[size_classes.size() - 1];
+ bool is_chunked_block = chunk_size <= size_classes[num_size_classes - 1];
if (!is_chunked_block) {
// This is a BigAllocationBlock
return 0;