This is the mail archive of the mailing list for the newlib project.

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

Re: user defined malloc

On Tue, 4 Jul 2000, J. Johnston wrote:

> > Basically, I am trying to find out if it is possible to provide my own
> > version of malloc?  If so, does this also require _malloc_r to be
> > overriden (see message below?.  And finally, if someone can provide some
> > information or a link on what is required to override _malloc_r (if it is
> > necessary).
> > 
> The _malloc_r routine is indeed a version of malloc which uses an additional
> parameter to receive a reentrancy structure.  The malloc routine simply calls _malloc_r with
> the default reentrancy structure.  Internally, any reentrant library routines must
> call _malloc_r instead of malloc and pass whichever reentrancy structure was
> passed to them.  Thus, you want to replace the _r interfaces rather than the
> top level routines like malloc() and free().

Thank you for the info.  Presently it is not possible to override the
_r interfaces, e.g. _malloc_r, with cygwin.  I will pass along your
message and request this change.  Just for clarification, should I ask
them to allow both the top level routines and the _r interfaces to be
replaceable, or just the _r interfaces?

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