Mail Archives: djgpp-workers/2003/03/14/12:28:38
This is a multi-part message in MIME format.
--------------934BF7B56324F54FCD3F25C7
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Martin Stromberg wrote:
> CBFalconer said:
> > Martin Stromberg wrote:
> > > CBFalconer said:
>
> > > > BTW the nmalloc.c code has not been altered since June 2002, and
> > > > the overall package is unaltered since November 2002 (some
> > > > documentation changes and testing). It remains available at:
> > >
> > > So it remains incompatible with the debugging machinery already
> > > present in DJGPP?
> > >
> > > I'll back out my local incorporation of it as it seems it never will
> > > be (and some DJGPP test case(s?) won't build).
> >
> > What won't build? I have never found any specification for the
>
> Some test case in djgpp/test. I don't remember exactly where but
> tests/libc/ansi/stdlib/ is not impossible. It tried to use the
> malloc debug hooks.
>
> > debugging systems, but the debug interface remains in nmalloc,
>
> You can't be using up-to-date information. It's checked in in CVS.
> You can get a current version of malloc.txh here:
> <http://www.ludd.luth.se/~ams/djgpp/cvs/djgpp/src/libc/ansi/stdlib/>.
>
> > You can see the dramatic effects by trying evilalgo.c, or by
> > executing test 4 of the hashlib package for something like 40000
> > allocations. nmalloc cuts the running time of that test by about
> > a factor of 60, all spent in the free routine.
>
> I agree that the current implementation has some problems. I think
> all on this list do so too and have for a long time.
>
> Your implementation has worked well for me (except for that test case
> above, which currently can't work). But I've mostly been rebuilding
> libc and the other DJGPP specific programs so I'm not sure that my
> environment is sufficiently stressful.
>
> Somebody needs to either rework your code into what's in the
> documentation or vice versa. That somebody doesn't exist. It's
> unlikely he'll appear. It's been like this a year or so.
>
> Hence, we will probably just patch up the current malloc implemention
> to avoid that evilalgo problem (not perfectly but workingly).
Is everybody talking about what I have attached (a zipped htm
file). If so, I think mallinfo and mallocmap can be trivially
implemented without changing nmalloc. mallocmap can thus ignore
the level parameter. malloc_debug is harder, and probably needs
the malloc hooks, which are not trivially implemented without
changes, unless a different malloc package is linked using the
alternative names and an interception package is loaded.
Actually, without NDEBUG set, the internal names are redefined to
be malloc, free, and realloc at compilation time. By changing
this one definition to redefine as _malloc, _free, and _realloc
there can be a 10 line generalized package, holding:
void *malloc(size_t sz) {return _malloc(sz);}
etc. and it might cost nothing if defined as inline. That would
make inserting the hooks trivial, and nothing existing need be
changed. The magic numbers in the malloc-hooks documentation
would have to go - they are returned by the existing (in nmalloc)
_sysquery call. Also nmalloc does not record a duplicate copy of
block size - I had similar provisions earlier but they adversely
affect the overhead for 8 byte alignment and people were worried
about that when I started this project.
Will somebody please fix the reply-to field on delivered messages.
--
Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT worldnet DOT att DOT net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
--------------934BF7B56324F54FCD3F25C7
Content-Type: application/x-zip-compressed;
name="malldbg.zip"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="malldbg.zip"
UEsDBBQAAAAIAENbbi4eBUrrZBEAAEU2AAALABEAbWFsbGRiZy5odG1VVA0AB54Ccj7QYXE+
/wFyPs1bbW8kt5H+LkD/gVYQe8aZlWR7PxxWWgG210k28e4Zt7sxDjhgwenmzPDUbyG7R5oE
+e/3VBXJ7p5uSdkY8CUIrJlpNlmsl6eeKnKvd21ZqEJX25dnpjq7OT253hmd09/WtoW5+VDx
3/z6Qr7jQWlarXZt2zwzf+3s/uXZ93XVmqp99v7QmDOVybeXZ625by9o/rP0VqVL8zI3PnO2
aW1d9YPjOkdjt6YyTre160eW+tbYalOr5+eXPLqw1a3aObN5eUZSvbi4wMo04rx224sz5UzR
z/NsV5e8i4uwT3xc1/mBfmpurncOH97WuXlxHSTAekVRZ2c38vf6Qt+sMAR7oyE0d4XPYf3f
lKas3QGD+S8Npvkdr/PoCiSvrEGffsEq17tvbt4dqlbfY4vfyE+NMze/sVVWdLlRnxftlW/z
wq7Pd59v2ysa4VvXZa2Ky6cPi31t8+UVqYvmiPO/6i04WOTm/c56temqjE3rTNu5yiuax5Wa
f9PrusMujG6Ub3RmVOf11pwr9bpV1p+eWLJxbnLV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