diff options
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/alloc.c b/src/alloc.c index 0a0b25bcb7d..055f5d82347 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -754,17 +754,20 @@ lisp_align_malloc (nbytes, type) | |||
| 754 | #ifdef HAVE_POSIX_MEMALIGN | 754 | #ifdef HAVE_POSIX_MEMALIGN |
| 755 | { | 755 | { |
| 756 | int err = posix_memalign (&base, BLOCK_ALIGN, ABLOCKS_BYTES); | 756 | int err = posix_memalign (&base, BLOCK_ALIGN, ABLOCKS_BYTES); |
| 757 | abase = err ? (base = NULL) : base; | 757 | if (err) |
| 758 | base = NULL; | ||
| 759 | abase = base; | ||
| 758 | } | 760 | } |
| 759 | #else | 761 | #else |
| 760 | base = malloc (ABLOCKS_BYTES); | 762 | base = malloc (ABLOCKS_BYTES); |
| 761 | abase = ALIGN (base, BLOCK_ALIGN); | 763 | abase = ALIGN (base, BLOCK_ALIGN); |
| 764 | #endif | ||
| 765 | |||
| 762 | if (base == 0) | 766 | if (base == 0) |
| 763 | { | 767 | { |
| 764 | UNBLOCK_INPUT; | 768 | UNBLOCK_INPUT; |
| 765 | memory_full (); | 769 | memory_full (); |
| 766 | } | 770 | } |
| 767 | #endif | ||
| 768 | 771 | ||
| 769 | aligned = (base == abase); | 772 | aligned = (base == abase); |
| 770 | if (!aligned) | 773 | if (!aligned) |