summaryrefslogtreecommitdiff
path: root/headers.c
diff options
context:
space:
mode:
Diffstat (limited to 'headers.c')
-rw-r--r--headers.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/headers.c b/headers.c
index de82c20..eac3e9f 100644
--- a/headers.c
+++ b/headers.c
@@ -196,6 +196,10 @@ GC_INNER void GC_init_headers(void)
register unsigned i;
GC_all_nils = (bottom_index *)GC_scratch_alloc((word)sizeof(bottom_index));
+ if (GC_all_nils == NULL) {
+ GC_err_printf("Insufficient memory for GC_all_nils\n");
+ EXIT();
+ }
BZERO(GC_all_nils, sizeof(bottom_index));
for (i = 0; i < TOP_SZ; i++) {
GC_top_index[i] = GC_all_nils;