diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/alloc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/alloc.c b/src/alloc.c index 054e1ca23ca..3feed51b1e9 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -20,6 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | 20 | ||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | 22 | ||
| 23 | #include <errno.h> | ||
| 23 | #include <stdio.h> | 24 | #include <stdio.h> |
| 24 | #include <limits.h> /* For CHAR_BIT. */ | 25 | #include <limits.h> /* For CHAR_BIT. */ |
| 25 | #include <signal.h> /* For SIGABRT, SIGDANGER. */ | 26 | #include <signal.h> /* For SIGABRT, SIGDANGER. */ |
| @@ -150,7 +151,8 @@ malloc_initialize_hook (void) | |||
| 150 | } | 151 | } |
| 151 | } | 152 | } |
| 152 | 153 | ||
| 153 | malloc_set_state (malloc_state_ptr); | 154 | if (malloc_set_state (malloc_state_ptr) != 0) |
| 155 | emacs_abort (); | ||
| 154 | # ifndef XMALLOC_OVERRUN_CHECK | 156 | # ifndef XMALLOC_OVERRUN_CHECK |
| 155 | alloc_unexec_post (); | 157 | alloc_unexec_post (); |
| 156 | # endif | 158 | # endif |
| @@ -174,6 +176,8 @@ alloc_unexec_pre (void) | |||
| 174 | { | 176 | { |
| 175 | #ifdef DOUG_LEA_MALLOC | 177 | #ifdef DOUG_LEA_MALLOC |
| 176 | malloc_state_ptr = malloc_get_state (); | 178 | malloc_state_ptr = malloc_get_state (); |
| 179 | if (!malloc_state_ptr) | ||
| 180 | fatal ("malloc_get_state: %s", strerror (errno)); | ||
| 177 | #endif | 181 | #endif |
| 178 | #ifdef HYBRID_MALLOC | 182 | #ifdef HYBRID_MALLOC |
| 179 | bss_sbrk_did_unexec = true; | 183 | bss_sbrk_did_unexec = true; |