User: Password:
|
|
Subscribe / Log in / New account

Linux can do it

Linux can do it

Posted Nov 13, 2008 15:07 UTC (Thu) by wtogami (subscriber, #32325)
In reply to: Zeroing freed memory by Felix_the_Mac
Parent article: /dev/ksm: dynamic memory sharing

http://udrepper.livejournal.com/11429.html
If you set MALLOC_PERTURB_=$NUMBER, it sets all malloc'ed bytes to $NUMBER, and the bitwise inverse upon free. It is great to expose otherwise difficult to detect bugs, at the expense of speed. It might also be useful for /dev/ksm.


(Log in to post comments)

Linux can do it

Posted Nov 13, 2008 19:52 UTC (Thu) by nix (subscriber, #2304) [Link]

It's a really cool feaure, but, well, Ulrich says that it 'Seems like the
number of people who know this feature is still almost zero'. Yes, that's
because it was never documented, as with pretty much everything glibc can
do above POSIX. (e.g., quick, how does LD_AUDIT work? How do you use it?
Good luck finding out without reading the source, and it's tricky to
understand even then.)


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds