Mail Archives: djgpp-workers/2003/06/18/15:40:44
CBFalconer wrote:
> Eli Zaretskii wrote:
> > >
... snip ...
> >
> > version of the library code and cannot look at that yourself. It is
> > also unreasonable to expect us to replace malloc with something that
> > breaks some of related features. Each feature we put into DJGPP is
> > sorely needed somewhere (Mark explained in this thread why memalign
> > and friends were added: to be able to port latest versions of GCC), so
> > we cannot afford to stop their support. We need nmalloc to be
> > compatible with memalign.
> >
... snip ...
> >
> > http://www.ludd.luth.se/~ams/djgpp/cvs/
> >
.. snip ...
>
> I can go get that, but what the d*evil am I looking for? Mark E.
> brought up another herd of interfaces? Where does it end? I
> don't want to rebuild everything. I have no idea how long it will
> take to implement. Basically I am thinking that nmalloc assigns
> an overlarge piece, saws off the head and puts it in the free
> list, saws off the tail and put that in the free list, and returns
> the remainder. This will definitely complicate nmalloc. And I
> have doubts that it is the right approach.
>
> And what about those other things, vmalloc, mmap, whatever?
I am looking at memalign.c and memalign.txh. I am planning to
install it in the main nmalloc module. It will reject all non
power of 2 alignment constants, also 0. As malloc, it will reject
any request for INT_MAX - 65536 or over, or an alignment over
65536. At least so far.
How should this tie into the various hooks, i.e. should it act
just like another malloc? Should it be non-hookable? Should
failures act like a malloc failure? All hook routines are called
with a pointer and a size as parameters, so there is no room to
echo back the alignment constant. I suppose if they need a third
parameter now is the time to add it.
AFAICT the other routines mentioned call memalign, and can be
ignored.
I think somebody has their head-firmly-up if they are making gcc
depend on these non-standardisms. It is going to become
impossible to port.
--
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!
- Raw text -