$NetBSD: patch-do,v 1.2 2013/05/29 11:11:12 wiz Exp $

--- libgc/headers.c.orig	2012-12-05 17:44:36.000000000 +0000
+++ libgc/headers.c
@@ -139,6 +139,8 @@ void GC_init_headers()
     register unsigned i;
     
     GC_all_nils = (bottom_index *)GC_scratch_alloc((word)sizeof(bottom_index));
+    if (GC_all_nils == NULL)
+	ABORT("out of memory");
     BZERO(GC_all_nils, sizeof(bottom_index));
     for (i = 0; i < TOP_SZ; i++) {
         GC_top_index[i] = GC_all_nils;
