libyama 0.4-b
Sponsored Links
libyama 0.4-b Ranking & Summary
File size:
0.012 MB
Platform:
Any Platform
License:
Freely Distributable
Price:
Downloads:
1320
Date added:
2006-03-17
Publisher:
Venkatesha Murthy G
libyama 0.4-b description
libyama is a malloc implementation that bundles leak tracking by auditing allocations, array bound write detection, detection of access to freed memory, free/realloc on invalid pointers. It grew out of an attempt to build array bound overwrite detection into LeakTrac, a leak tracker I wrote earlier.
Since LeakTrac performed only book keeping and not any allocation, it was not possible to make LeakTrac detect array bound write, hence an allocator that does; and also tracks leaks.
You can think of it as merging LeakTrac and code that was inspired by ElectricFence.
If you only want to track leaks, then LeakTrac is just what you need. If you want an allocator that lets you debug also, then YaMa is the one for you. Sure, there are other similar things on the block - which is why this is Yet another Memory allocator.
Main features:
- provides malloc, calloc, realloc and free
- tracks and reports leaks
- detects accesses beyond allocated memory
- detects accesses to freed memory
- detects free on non-malloced pointers, NULL pointers
- detects realloc on non-malloced pointers
Installation:
Currently YaMa is written for Linux x86. Youll need a kernel that provides mmap etc, and gcc that can build ELF shared libraries. You also need to install binutils, if you havent already (very unlikely) And youll need the /proc filesystem.
To install YaMa
Unpack the archive
Edit Makefile; the only things you need to change are INSTALLDIR and BT.
make lib to make
make install to install. Youll need write permission on INSTALLDIR.
You may need to run ldconfig
Usage:
YaMa contains libyama.so, a shared library installed into INSTALLDIR by make install. The library provides malloc, calloc, realloc and free which can be used as replacements to their libc implementations.
A program can be linked against libyama on the command line (-lyama). A more interesting way to use libyama would be to preload it using LD_PRELOAD. The command line
LD_PRELOAD=libyama.so
would cause all calls to malloc, calloc, realloc and free originating from the program being run to be handled by the YaMa implementation. If libyama.so doesnt show up on ldconfig -p or it is not on your LD_LIBRARY_PATH, you need to specify the full path length.
When the program errs by accessing memory across an array bound, i.e, beyond the memory allocated using malloc/calloc/realloc, it receives a SIGSEGV. An access to freed memory also results in a SIGSEGV. If youve compiled your program using -g, you can locate the offending statement using any debugger on the core file. Note that overwrites on statically allocated arrays are not detected by YaMa.
If the program peforms an invalid free or realloc, an "Alert!" message is written to stderr, along with the call chain till the free/realloc. The call fails.
Upon normal program termination, either thro exit or return from main, a summary of leaks is printed on stderr. The size of each chunk of memory that remains un-freed at the end of the program is reported, along with the call chain till the allocation.
The behaviour of YaMa on malloc (0) (or calloc (x, 0)) is controlled by the environment variable ALLOWMALLOCZERO. If this variable is set to values <= 0, YaMa prints an Alert! message on malloc (0) and the call fails. If ALLOWMALLOCZERO is set to 1, libyama prints an Alert! message but the call succeeds and a valid pointer is returned. However, writes on this pointer will immediately trigger a SIGSEGV. If ALLOWMALLOCZERO is >= 2, YaMa returns a valid pointer and no warning is printed. Writes to this pointer, too, will fail. If ALLOWMALLOCZERO is not set, the behaviour is identical to ALLOWMALLOCZERO = 0.
Enhancements:
- Fixed a bug in the stack backtrace code which would crash libyama. Compile time control of backtracing (Ive found it useful at times not to have tracing).
Since LeakTrac performed only book keeping and not any allocation, it was not possible to make LeakTrac detect array bound write, hence an allocator that does; and also tracks leaks.
You can think of it as merging LeakTrac and code that was inspired by ElectricFence.
If you only want to track leaks, then LeakTrac is just what you need. If you want an allocator that lets you debug also, then YaMa is the one for you. Sure, there are other similar things on the block - which is why this is Yet another Memory allocator.
Main features:
- provides malloc, calloc, realloc and free
- tracks and reports leaks
- detects accesses beyond allocated memory
- detects accesses to freed memory
- detects free on non-malloced pointers, NULL pointers
- detects realloc on non-malloced pointers
Installation:
Currently YaMa is written for Linux x86. Youll need a kernel that provides mmap etc, and gcc that can build ELF shared libraries. You also need to install binutils, if you havent already (very unlikely) And youll need the /proc filesystem.
To install YaMa
Unpack the archive
Edit Makefile; the only things you need to change are INSTALLDIR and BT.
make lib to make
make install to install. Youll need write permission on INSTALLDIR.
You may need to run ldconfig
Usage:
YaMa contains libyama.so, a shared library installed into INSTALLDIR by make install. The library provides malloc, calloc, realloc and free which can be used as replacements to their libc implementations.
A program can be linked against libyama on the command line (-lyama). A more interesting way to use libyama would be to preload it using LD_PRELOAD. The command line
LD_PRELOAD=libyama.so
would cause all calls to malloc, calloc, realloc and free originating from the program being run to be handled by the YaMa implementation. If libyama.so doesnt show up on ldconfig -p or it is not on your LD_LIBRARY_PATH, you need to specify the full path length.
When the program errs by accessing memory across an array bound, i.e, beyond the memory allocated using malloc/calloc/realloc, it receives a SIGSEGV. An access to freed memory also results in a SIGSEGV. If youve compiled your program using -g, you can locate the offending statement using any debugger on the core file. Note that overwrites on statically allocated arrays are not detected by YaMa.
If the program peforms an invalid free or realloc, an "Alert!" message is written to stderr, along with the call chain till the free/realloc. The call fails.
Upon normal program termination, either thro exit or return from main, a summary of leaks is printed on stderr. The size of each chunk of memory that remains un-freed at the end of the program is reported, along with the call chain till the allocation.
The behaviour of YaMa on malloc (0) (or calloc (x, 0)) is controlled by the environment variable ALLOWMALLOCZERO. If this variable is set to values <= 0, YaMa prints an Alert! message on malloc (0) and the call fails. If ALLOWMALLOCZERO is set to 1, libyama prints an Alert! message but the call succeeds and a valid pointer is returned. However, writes on this pointer will immediately trigger a SIGSEGV. If ALLOWMALLOCZERO is >= 2, YaMa returns a valid pointer and no warning is printed. Writes to this pointer, too, will fail. If ALLOWMALLOCZERO is not set, the behaviour is identical to ALLOWMALLOCZERO = 0.
Enhancements:
- Fixed a bug in the stack backtrace code which would crash libyama. Compile time control of backtracing (Ive found it useful at times not to have tracing).
libyama 0.4-b Screenshot
libyama 0.4-b Keywords
YaMa
LeakTrac
ALLOWMALLOCZERO
malloc implementation
libyama
malloc
need
program
memory
Realloc
libyama 0.4-b
Libraries
Programming
Bookmark libyama 0.4-b
libyama 0.4-b Copyright
WareSeeker periodically updates pricing and software information of libyama 0.4-b full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of libyama 0.4-b Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
Related Software
libarena is a custom memory allocator interface and implementation. Free Download
sl is a memory-efficient generic linked list library. Free Download
z3lib is an RFC 1951/1952 compliant compression library with an easy interface. Free Download
TIJmp is a memory profiler for java. Free Download
Failmalloc generates a shared library which can be loaded by LD_PRELOAD or linked at compilation time. Free Download
libshbuf introduces a new IPC concept: the "shared buffer", a more flexible and faster alternative for standard Unix FIFOs. Free Download
Cntlm is an authenticating HTTP proxy intended to help you break free from the chains of the proprietary world... Free Download
LinuxRogue is a cleaned up version of the Rogue port to Linux. Free Download
Latest Software
Popular Software
Favourite Software