Re: Data alignment code... What goes on?
- From: "Anders Isaksson" <blockcad@xxxxxxxxxxxxxxx>
- Date: Fri, 22 Dec 2006 23:51:43 +0100
dk_sz wrote:
So why not simply
#define ALIGN4(len) (4)
#define ALIGN8(len) (8)
Because ALIGN4(5) gives 8, ALIGN4(12) gives 16, ALIGN16(17) gives 32 and so
on. The macros *don't* align, they pad the size of the requested allocation
up to a multiple of the number in their name.
--
Anders Isaksson, Sweden
BlockCAD: http://web.telia.com/~u16122508/proglego.htm
Gallery: http://web.telia.com/~u16122508/gallery/index.htm
.
- Follow-Ups:
- Re: Data alignment code... What goes on?
- From: dk_sz
- Re: Data alignment code... What goes on?
- References:
- Data alignment code... What goes on?
- From: dk_sz
- Re: Data alignment code... What goes on?
- From: Anders Isaksson
- Re: Data alignment code... What goes on?
- From: dk_sz
- Re: Data alignment code... What goes on?
- From: Anders Isaksson
- Re: Data alignment code... What goes on?
- From: dk_sz
- Data alignment code... What goes on?
- Prev by Date: Fastcode AnsiStringReplace B&V 2.0.0
- Next by Date: Re: Data alignment code... What goes on?
- Previous by thread: Re: Data alignment code... What goes on?
- Next by thread: Re: Data alignment code... What goes on?
- Index(es):
Relevant Pages
|