1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:27:45 +00:00

UserspaceEmulator: Implement very basic leak checking :^)

Upon exit, the emulator will now print a leak report of any malloc
allocations that are still live and don't have pointers to their base
address anywhere in either another live mallocation, or in one of the
non-malloc-block memory regions.

Note that the malloc-block memory region check is not fully functional
and this will work even better once we get that fixed.

This is pretty cool. :^)
This commit is contained in:
Andreas Kling 2020-07-16 17:04:27 +02:00
parent 7e13244238
commit f6584bfc36
4 changed files with 78 additions and 2 deletions

View file

@ -98,6 +98,8 @@ public:
SharedBufferRegion* shbuf_region(int shbuf_id);
NonnullOwnPtrVector<Region>& regions() { return m_regions; }
private:
OwnPtr<Region> m_tls_region;
NonnullOwnPtrVector<Region> m_regions;