1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 10:47:35 +00:00

UserspaceEmulator: Capture backtraces of malloc/free events

This lets us show backtraces for each leaked mallocation in the leak
report at the end. :^)
This commit is contained in:
Andreas Kling 2020-07-16 17:14:58 +02:00
parent f6584bfc36
commit 441918be7e
4 changed files with 32 additions and 14 deletions

View file

@ -56,6 +56,9 @@ private:
FlatPtr address { 0 };
size_t size { 0 };
bool freed { false };
Vector<FlatPtr> malloc_backtrace;
Vector<FlatPtr> free_backtrace;
};
Mallocation* find_mallocation(FlatPtr);