delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-workers-bounces using -f |
Date: | Fri, 8 Feb 2002 13:53:42 -0500 |
Message-Id: | <200202081853.g18IrgO08699@envy.delorie.com> |
From: | DJ Delorie <dj AT delorie DOT com> |
To: | djgpp-workers AT delorie DOT com |
In-reply-to: | <7872-Fri08Feb2002203948+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> |
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 |
> > It looks like it assumes sbrk() does that for it. It does round the > > requested size up to an 8 byte multiple. > > But isn't the pointer returned to the application is 4 bytes after the > address returned by sbrk? If so, how can it be aligned? It doesn't align to 8 bytes. It rounds the *size* up to 8 bytes. Malloc doesn't need to align to "optimum" alignment. It only needs align to "required" alignment. If we need to increase the alignment, then we will.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |