Original Post
Just a quick question about aligned memory blocks...
Is it possible to just do
#define align4(x) ((x & 0x03) ? (x + (4 - (x & 0x03))) : (x))on a pointer (if fed an int, the int will be divisible by four, incremented by 1, 2 or three to achieve this, I hope) so it is aligned? Of course, assuming you allocate an additional three bytes of memory. I use Windows (in case Win has some strange way of protecting memory). Edit: very bad typo [edited by - Kurioes on December 14, 2002 5:16:59 PM]