INSTALLING - you'll need OpenGL and GLUT to compile and run it COMPILING for compiling the main heapdraw you'll need glut. g++ main.cpp Heap.cpp draw.cpp -lglut for compiling log-malloc.so: gcc -nostartfiles -shared -fPIC -g -ldl -o log-malloc.so log-malloc.c RUNNING gera@poxiran$ ./heapdraw Use: g [-a] [-q] [-v] [-p pid] [-r region] -R [lo-hi] -t type a autoregions: automatically find regions q quiet: don't print found errors v verbose, more is more p PID to follow, default is all, 0 is first, other is specific PID r region to draw (0 is loose region, and it's the default) R Manually define a region. lo and hi are its limits (can be hex) t input file type, where type is one of: ltrace ltrace -o ls.ltrace -f -tt -i -efork,vfork,clone,malloc,realloc,free,calloc,mmap,munmap,mremap,mprotect,mmap2 /bin/ls truss truss -o ls.truss -f -d -l -t \!all -u a.out,*::malloc,realloc,free,calloc,fork,vfork,mmap,munmap,mprotect,brk /bin/ls ntsd ntsd -cf hd.ini calc.exe heapdraw will read input from stadard in, so you have to run it like: $ heapdraw ls-lr.ltrace or, if you don't want to use stderr, you can rather do: $ LOG_MALLOC_OUTPUT=ls-lr.ltrace LD_PRELOAD=./log-malloc.so ls -lR .. if you prefer to use ltrace (for example to attach to a running process after some initialization has already happened): $ ltrace -o ls.ltrace -f -tt -i -efork,vfork,clone,malloc,realloc,free,calloc,mmap,munmap,mremap,mprotect,mmap2 /bin/ls or, of course: $ ltrace -o ls.ltrace -f -tt -i -efork,vfork,clone,malloc,realloc,free,calloc,mmap,munmap,mremap,mprotect,mmap2 -p `pidof -s bash` For Solaris or Windows instructions, follow the usage help of heapdraw.