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 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 Precedence: bulk > 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.