On Fri, Jan 21, 2022 at 08:26:00PM -0800, John Reiser wrote:
>It
>might be worthwhile to have a CFLAG that can tell glibc (or other allocators)
>to substitute something like calloc for malloc.
The environment variable MALLOC_PERTURB_ has been used by glibc malloc
for over 15 years.
Just a note that glibc 2.34 (annoyingly) removed this feature,
replacing it with a much more complex mechanism. Here's my patch to
fix nbdkit:
https://gitlab.com/nbdkit/nbdkit/-/commit/362e0fdcae37db876e13b944102a5c1...
You'll want to look at the "mentioned in commit" updates on that page
too since the initial fix required further tweaking.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/