Debug Malloc (Dmalloc) Library Release Notes
Version: Release 5.0.0
Last-Version: 4.8.2
Date: May 15, 2003
Overview
New Functionality
Dmalloc Utility
settings.dist
Installation
Programming
Environmental Variables
Bugs Fixed
Major release with a number of internal changes as well as some
external features. Reworked the entire pointer management structures
to use skip-lists which simplified a good bit of the code and removed
a number of functions and slimmed down many others.
- Added dmalloc_debug_setup function to set the environment from a
string. This will allow servers or cgi-bin programs which cannot
affect their environment to enable dmalloc checking.
- Added -M --memory-limit argument to dmalloc to limit the amount
of memory that dmalloc can allocate.
- Added an internal memory space feature where people can
statically allocate a chunk of memory for dmalloc to manage. This is
for embedded systems without sbrk.
- Added separate characters for blanking allocations (0xda for
dmalloc-allocation) versus freed pointers (0xdf for
dmalloc-free).
- A couple of other features not annotated in the ChangeLog
file.
- Added -M --memory-limit argument to dmalloc to limit the amount
of memory that dmalloc can allocate. You can specify the limit as
256k, 120m, or 2g to get kilobytes, megabytes, or gigabytes
respectively.
- Removed the -S --short-tokens flag and support for short version
of the debug tokens. I apologize to folks that used this.
- Added better usage information to the -u and --usage flags.
- Now when you clear out all of the debug tokens, dmalloc will tell
the environment to unset the variable.
- By popular demand, I've changed the default behavior for free(0L)
[cheering heard in the distance]. By default now, freeing a 0L
pointer is fine unless the ALLOW_FREE_NULL variable is set to 0.
- Removed the USE_DMALLOC_LEAP functionality to simplify a number
of sections in the code. I apologize to those developers who relied
on this feature. Please feel free to contact me with any questions
for replacement functionality.
- Added the INTERNAL_MEMORY_SPACE setting which will statically
allocate a chunk of memory for dmalloc to manage. This is for
embedded systems without sbrk.
- Removed the INCLUDE_RCS_IDS switch.
- Changed BLANK_CHAR to be ALLOC_BLANK_CHAR and FREE_BLANK_CHAR.
New allocations are now set with a different character than freed
pointers.
- Removed the FIRST_FIT, BEST_FIT, and WORST_FIT settings which
really weren't obeyed well in past versions and aren't supported in
the current one.
- Changed the LARGEST_BLOCK setting from bits to be
LARGEST_ALLOCATION and increased the default value from 64mb to
256mb.
- Added the DEFAULT_SMALLEST_ALLOCATION with which you can set the
smallest sized allocation allowed. Any blocks smaller than this will
be rounded up to this size.
- [Finally] fixed a long standing issue where the thread and C++
shared libraries where linking with the wrong library.
- This new version of dmalloc utilized the skip-list data type to
manage all of its pointers and freed memory. Skip lists are
alternatives to balanced trees with a significantly simpler
implementation with low power overhead. The code to implement the
skip-list in dmalloc is 254 lines including 85 lines of function
header comments.
- Removed the log-blocks and heap-check-map tokens. Please contact
me if you used these functions and would like to see something like
them again.
- Added limit=XX setting with which you can limit the amount of
memory that dmalloc can allocate. This does not include it's
administrative overhead.
- I believe that the long standing problem where the seen pointer
in some situations would not be initialized has been fixed.
- [Finally] fixed a long standing issue where the thread and C++
shared libraries where linking with the wrong library.
- This is a major release. Many bugs were probably created
not fixed.
Dmalloc Home Page.
Copyright 2000 by Gray Watson.