[reprise] PIC and flat shared library support for m68k
Erik Andersen
andersen at codepoet.org
Fri Oct 27 15:18:46 UTC 2006
On Fri Oct 27, 2006 at 03:15:05PM +0100, Richard Sandiford wrote:
> (a) MALLOC_HEADER_SIZE == MALLOC_ALIGNMENT
> (b) the header contains a size value of type size_t
> (c) sizeof (size_t) is 4 on m68k, but...
> (d) __alignof__ (double) is only 2 (the largest alignment used on m68k)
Perhaps we could do something like the following:
union malloc_max_size
{
int i;
size_t s;
double d;
void *p;
};
union malloc_alignment
{
char c;
union malloc_max_size u;
};
#define MALLOC_ALIGNMENT (offsetof(struct fooalign, u))
#define MALLOC_HEADER_SIZE (sizeof(union malloc_max_size))
-Erik
--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
More information about the uClibc
mailing list