This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: malloc debug functions


> > Gene McCulley <mcculley@cuspy.com> writes:
> > 
> > > The 2.0.6 version NEWS file mentions malloc_object_allocated_size,
> > > malloc_find_object_address, and malloc_walk.  The ChangeLog mentions
> > > the creation of malloc-size.c and malloc-walk.c, but they don't
> > > exist.
> 
> That is obvious.  What should also be obvious is that such a
> user-incompatible change should not be made without warning and
> explanation.  At the very least, their disappearance should be in noted
> NEWS.  If it is feasible to implement them in the new malloc, then they
> should be added.

For the new malloc:

malloc_object_allocated_size() already exists -- it's just called
malloc_usable_size() now (maybe an alias could be added ?).

malloc_find_object_address() would be extremely slow if implemented,
and could not work for mmap()ed chunks, as far as I can see.

Similarly for malloc_walk() -- it could not work properly if the heap
is fragmented by foreign sbrk() calls, or for mmap()ed chunks.

My question is: Were these functions available in a widely used glibc
release such that it would be worth to spend time on implementing
these functions for the new releases ?  I would actually prefer having
a new stand-alone GNU malloc release with these functions (the last
one I have, from late 1994, doesn't seem to have them).

Regards,
Wolfram.
-- 
`Surf the sea, not double-u three...'
wmglo@dent.med.uni-muenchen.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]