delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/02/09/09:45:09

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
Date: Sat, 9 Feb 2002 09:45:08 -0500
Message-Id: <200202091445.g19Ej8k18163@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp-workers AT delorie DOT com
In-reply-to: <7704-Sat09Feb2002164033+0200-eliz@is.elta.co.il>
Subject: Re: Alignment problem
References: <3C629769 DOT AEAFB611 AT cyberoptics DOT com> <379-Fri08Feb2002101042+0200-eliz AT is DOT elta DOT co DOT il> <200202081420 DOT g18EKWb06863 AT envy DOT delorie DOT com> <7872-Fri08Feb2002203948+0200-eliz AT is DOT elta DOT co DOT il> <200202081853 DOT g18IrgO08699 AT envy DOT delorie DOT com> <9003-Sat09Feb2002090616+0200-eliz AT is DOT elta DOT co DOT il> <200202091234 DOT g19CYUV17283 AT envy DOT delorie DOT com> <7704-Sat09Feb2002164033+0200-eliz AT is DOT elta DOT co DOT il>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Then perhaps we should always align on 8-byte boundary; GCC already
> does that for the stack.  Since malloc rounds the allocation size to
> an integral multiple of 8, it sounds like making sure every allocation
> is 8-byte aligned should boil down to forcing a suitable alignment of
> the beginning of every contiguous chunk returned by sbrk.

It also means that the overhead between chunks must be a multiple of
8, or at least that the size is rounded up so that size+overhead is a
multiple of 8.

And I think it's only the non-contiguous sbrks we need to align, since
for contiguous ones we just attach them to the previous sbrk.

- Raw text -


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