4 /* replace undef by define */
5 #define ALIGN_EIGHT_BYTES /* Use 8-byte alignment. */
7 #ifdef ALIGN_EIGHT_BYTES
10 #define ALIGN_SIZE sizeof(size_t)
13 #define ALIGN(x) (((x) + (ALIGN_SIZE - 1)) & ~(ALIGN_SIZE - 1))
16 calloc(size_t nelem
, size_t elsize
)
20 size_t size
= ALIGN(nelem
* elsize
);
23 if (p
== NULL
) return NULL
;
24 q
= (size_t *) (p
+ size
);
25 while ((char *) q
> p
) *--q
= 0;