754 |
#ifdef HAVE_POSIX_MEMALIGN |
#ifdef HAVE_POSIX_MEMALIGN |
755 |
{ |
{ |
756 |
int err = posix_memalign (&base, BLOCK_ALIGN, ABLOCKS_BYTES); |
int err = posix_memalign (&base, BLOCK_ALIGN, ABLOCKS_BYTES); |
757 |
abase = err ? (base = NULL) : base; |
if (err) |
758 |
|
base = NULL; |
759 |
|
abase = base; |
760 |
} |
} |
761 |
#else |
#else |
762 |
base = malloc (ABLOCKS_BYTES); |
base = malloc (ABLOCKS_BYTES); |
763 |
abase = ALIGN (base, BLOCK_ALIGN); |
abase = ALIGN (base, BLOCK_ALIGN); |
764 |
|
#endif |
765 |
|
|
766 |
if (base == 0) |
if (base == 0) |
767 |
{ |
{ |
768 |
UNBLOCK_INPUT; |
UNBLOCK_INPUT; |
769 |
memory_full (); |
memory_full (); |
770 |
} |
} |
|
#endif |
|
771 |
|
|
772 |
aligned = (base == abase); |
aligned = (base == abase); |
773 |
if (!aligned) |
if (!aligned) |