into a single object module. This avoids client programs picking
up part of the allocation routines from mmalloc and part from libc,
which can lead to undefined behavior.
(CFILES): Add mm.c
(TARGETOBJS): Define to be either the individual objects or the
single combined object.
(TARGETLIB): Create the archive using TARGETOBJS.
* mm.c: New file that simply #includes the other source C files.
brk value.
* mmcheck.c (mmcheckf): Renamed from mmcheck and new FORCE argument
added. Replaced hack that always allowed checking routines to be
installed and enforce restriction that they have to be installed
prior to allocating any memory on the used heap or the FORCE argument
has to be non-NULL.
(mmcheck): New function that calls mmcheckf with FORCE set to zero,
for backwards compatibility.
* mmalloc.c (malloc): Store result in local variable before
returning it. Makes debugging much easier at negligible cost.
* mmalloc.h (mmcheckf): Declare.
* attach.c (reuse): Call mmcheckf rather than mmcheck.
* mmap-sup.c (__mmalloc_mmap_morecore): Improve to allow mmap
to select a base mapping address if none is otherwise given.
(mmalloc_findbase): New function that user can call to find
an available mapping address of a given size.
* mmalloc.h: check if STDC_HEADERS instead of __STDC__.
* mmprivate.h: check if STDC_HEADERS instead of __STDC__.
This change is necessary to build under AIX 3.2.5 w/ cc after Stan's
Oct 24 change. I'm not convinced that changing mmalloc.h in this way
is such a good thing--if a directory that doesn't use autoconf (or one
that DOES use autoconf but doesn't put all the defines on the command
line), and it includes mmalloc.h, the right thing won't happen.
I believe gdb is the only directory which uses mmalloc, though, so
it should be OK.
(mmalloc.h): Include.
* mmalloc.h: Remove all but declarations of mmalloc functions.
(ansidecl.h): Include.
* attach.c, et al: Include mmprivate.h instead of mmalloc.h.
need to save some data on a per-process basis for mapped regions
that are shared.
* attach.c (reuse): Update the morecore field for reused mapped
regions to be correct for the current process.