Opened 15 years ago

Closed 15 years ago

#4804 closed enhancement (fixed)

integrating malloc_debug

Reported by: mmadia Owned by: mmlr
Priority: normal Milestone: R1
Component: System/libroot.so Version: R1/alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

This haiku-development ML thread mentions integrating src/system/libroot/posix/malloc_debug and possibly making it available as a runtime setting. This which will allow it to be enabled and configured dynamically.

For now, malloc_debug can be enabled by switching over the malloc to the malloc_debug directory in the src/system/libroot/posix/Jamfile and rebuilding libroot. It can also do leak checking and does initialize and overwrite freed memory with known values to make access to these more obvious.

Change History (2)

comment:1 by mmlr, 15 years ago

Owner: changed from axeld to mmlr
Status: newassigned

comment:2 by mmlr, 15 years ago

Resolution: fixed
Status: in-progressclosed

Ingo has since added libroot_debug.so which can be used using LD_PRELOAD. To use malloc_debug the app needs to be run like this:

~> LD_PRELOAD="libroot_debug.so" /path/to/app

I find that a pretty elegant solution which avoids any messing with the normal libroot. So this can be considered "fixed".

Note: See TracTickets for help on using tickets.