serenity/Userland/DevTools/UserspaceEmulator
Tobias Christiansen c4a9f0db82 UserspaceEmulator: Improve detection of memory leaks
Previous a mallocation was marked as 'reachable' when any other
mallocation or memory region had a pointer to that mallocation. However
there could be the situation that two mallocations have pointers to each
other while still being unreachable from anywhere else. They would be
marked as 'reachable' regardless.

This patch replaces the old way of detemining whether a mallocation is
reachable by analyzing the dependencies of the different mallocations
using a graph-approach. Now mallocations are only reachable if pointed
to by other reachable mallocations or other memory regions.

A nice bonus is that this gets rid of a nested for_each_mallocation, so
the complexity of leak finding becomes linear instead of quadratic.
2021-04-12 18:02:16 +02:00
..
CMakeLists.txt UserspaceEmulator: Split large file into logical pieces 2021-03-11 08:54:54 +01:00
Emulator.cpp UserspaceEmulator: Increase stack size from 64 * KiB to 1 * MiB 2021-03-14 13:55:29 +01:00
Emulator.h UserspaceEmulator: Update virt$lseek and virt$ftruncate for 64bit off_t 2021-03-23 19:56:13 +01:00
Emulator_syscalls.cpp LibC: Move S_* defines into <fcntl.h> 2021-04-11 09:51:20 +02:00
main.cpp Everywhere: Remove klog(), dbg() and purge all LogStream usage :^) 2021-03-12 17:29:37 +01:00
MallocTracer.cpp UserspaceEmulator: Improve detection of memory leaks 2021-04-12 18:02:16 +02:00
MallocTracer.h UserspaceEmulator: Improve detection of memory leaks 2021-04-12 18:02:16 +02:00
MmapRegion.cpp UserspaceEmulator: Do not pass MAP_FIXED to Kernel 2021-03-11 08:54:54 +01:00
MmapRegion.h UserspaceEmulator: Add fast-path for is<MmapRegion>() 2021-03-09 15:17:15 +01:00
Range.cpp UserspaceEmulator: Enable splitting regions at arbitrary points 2021-03-08 22:57:36 +01:00
Range.h UserspaceEmulator: Enable splitting regions at arbitrary points 2021-03-08 22:57:36 +01:00
RangeAllocator.cpp UserspaceEmulator: Convert a weird klog(!) to dbgln() 2021-03-12 11:23:26 +01:00
RangeAllocator.h
Region.cpp UserspaceEmulator: Add fast-path for is<MmapRegion>() 2021-03-09 15:17:15 +01:00
Region.h UserspaceEmulator: Add fast-path for is<MmapRegion>() 2021-03-09 15:17:15 +01:00
Report.h Everywhere: Remove klog(), dbg() and purge all LogStream usage :^) 2021-03-12 17:29:37 +01:00
SimpleRegion.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
SimpleRegion.h
SoftCPU.cpp UE: Use AK's bit_cast and not reimplement it 2021-04-08 23:57:16 +02:00
SoftCPU.h UserspaceEmulator+LibC: Use sys$emuctl() to pass malloc info to UE 2021-03-09 11:31:18 +01:00
SoftMMU.cpp UserspaceEmulator: Keep the MMU regions list sorted 2021-03-09 11:31:18 +01:00
SoftMMU.h UE: Default initialize regionmap 2021-04-08 23:57:16 +02:00
ValueWithShadow.h