--- gcmain.c.orig	Sat Apr  8 09:07:11 2000
+++ gcmain.c	Sat Apr  8 09:07:54 2000
@@ -13,10 +13,21 @@
 #endif
 int real_main(int,char**,char**);
 
+/* Out-of-memory handler for GC. */
+void *
+die_oom(size_t bytes)
+{
+  fprintf(stderr, "Out of memory: %d bytes unavailable!\n", bytes);
+  exit(1);
+}
+
 int
 main(int argc, char **argv, char **envp)
 {
     int dummy;
+
+    /* Set up to die if we run out of memory. */
+    GC_oom_fn = die_oom;
     GC_stackbottom = (ptr_t)(&dummy);
     return(real_main(argc, argv, envp));
 }
