www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/06/22/00:37:21

Message-ID: <3EF53044.CDEA5BA1@yahoo.com>
Date: Sun, 22 Jun 2003 00:27:48 -0400
From: CBFalconer <cbfalconer AT yahoo DOT com>
Organization: Ched Research
X-Mailer: Mozilla 4.75 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: LIBM patch for GCC 3.3 - math changes
References: <200306201334 DOT h5KDYMWU012441 AT speedy DOT ludd DOT luth DOT se> <000e01c337aa$7b238800$0100a8c0 AT acp42g> <3EF3E113 DOT 1C8C9C2B AT yahoo DOT com> <9743-Sat21Jun2003123351+0300-eliz AT elta DOT co DOT il> <3EF449C0 DOT 8C8A0C61 AT yahoo DOT com> <3791-Sun22Jun2003063027+0300-eliz AT elta DOT co DOT il>
Reply-To: djgpp-workers AT delorie DOT com

Eli Zaretskii wrote:
> > From: CBFalconer <cbfalconer AT yahoo DOT com>
> >
> > BTW I have heard nothing about the use of hooks/malldbg with
> > memalign etc. I referred to in another thread.
> 
> I think we don't need any more hooks beyond those in malloc and
> friends.

It may be necessary to put them in if only for consistency.  The
end result of memalign will be the equivalent of a malloc, so if
we want to catch arena errors etc. as early as possible the hooks
will need to be there.  The arena dump (mallocmap) and data from
mallinfo will naturally include the effects from memalign.  The
hooks could ignore the alignment parameter easily and just use the
actual malloc hooks - the only penalty I can see is that the user
may be dumbfounded as to why it failed (i.e. non-power-of-2
alignment parameter, or no suitable free space left).

The routine is a real pain.  I think memalign should also fail for
alignment parameter < ALIGN value (i.e. 8 at present).

-- 
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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019