Josh Coalson wrote:
> yes, I definitely want to fix them all. the ones from
memory.c
> are actually "on purpose", but if you know of
a more correct and
> warning-less way to align pointers that will work for
different
> pointer widths (I'm sure there must be one) please let
me know.
Well for the aligned pointer allocation you can use
posix_memalign
which from the Linux man page looks like:
#define _XOPEN_SOURCE 600
#include <stdlib.h>
int posix_memalign(void **memptr, size_t alignment,
size_t size);
DESCRIPTION
The function posix_memalign() allocates size bytes
and places
the address of the allocated memory in *memptr. The
address of
the allocated memory will be a multiple of
alignment, which
must be a power of two and a multiple of sizeof(void
*).
Cheers,
Erik
--
+-----------------------------------------------------------
+
Erik de Castro Lopo
+-----------------------------------------------------------
+
Being really good at C++ is like being really good at using
rocks to
sharpen sticks." -- Thant Tessman
_______________________________________________
Flac-dev mailing list
Flac-dev xiph.org
http:
//lists.xiph.org/mailman/listinfo/flac-dev
|