delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/06/24/20:30:20

Message-ID: <3EF8E270.5632E34F@yahoo.com>
Date: Tue, 24 Jun 2003 19:44: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: memalign hooks (was: LIBM patch for GCC 3.3 - math changes)
References: <20030623061004 DOT 0164E33DBBB AT iceage DOT anubex DOT com> <3EF8A24D DOT 9BCD6C6F AT phekda DOT freeserve DOT co DOT uk>
Reply-To: djgpp-workers AT delorie DOT com

Richard Dawe wrote:
> Tim Van Holder wrote:
> >
> > > > I think memalign should also fail for alignment parameter < ALIGN
> > > > value (i.e. 8 at present).
> > >
> > > IMHO, it should behave in a way that is compatible with other
> > > implementations.  Could someone please look on their nearest Unix or
> > > GNU/Linux box and see what does memalign there do for such small
> > > alignment parameters?  (Sorry, no time to do this myself.)
> >
> > Below is what the glibc 2.3.2 (Red Hat 8.0) has to say; note that it
> > does not say what it does if BOUNDARY is NOT a power of 2.
> > I could check the glibc sources if necessary.
> [snip]
> 
> FWIW it segfaults for me (on glibc 2.1.3) if the boundary is not a
> power of 2. I'm not saying that that's desireable behaviour. Maybe it
> should just fail by returning NULL in DJGPP.

Exactly what I am planning.  Segfaults etc. should be reserved for
a fouled arena.

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