diff -ruN klic-3.003-2002-03-04/Configure klic-3.003-2002-03-04a/Configure
--- klic-3.003-2002-03-04/Configure	Fri Jan 18 15:37:50 2002
+++ klic-3.003-2002-03-04a/Configure	Mon Mar  4 10:53:21 2002
@@ -1347,7 +1347,7 @@
 else
 cat <<GAZONK >>runtime/Makefile
 
-DISTCFLAGS = \$(CFLAGS) -DDEBUGLIB -DDIST -I../include
+DISTCFLAGS = \$(CFLAGS) -DDIST -I../include
 EXT_OTHER_HEADERS =
 DIST_OTHER_SRCS =
 DIST_OTHER_OBJS =
diff -ruN klic-3.003-2002-03-04/include/klic/alloc.h klic-3.003-2002-03-04a/include/klic/alloc.h
--- klic-3.003-2002-03-04/include/klic/alloc.h	Mon Feb 25 13:58:17 2002
+++ klic-3.003-2002-03-04a/include/klic/alloc.h	Mon Mar  4 11:48:40 2002
@@ -36,6 +36,7 @@
 extern void klic_interrupt(struct goalrec* qp);
 
 /* runtime/alloc.c */
+extern q* klic_alloc(size_t size);
 extern void* malloc_check(unsigned long size);
 extern void* realloc_check(void* original, unsigned long newsize);
 extern void initalloc(void);
diff -ruN klic-3.003-2002-03-04/runtime/Makefile.tail klic-3.003-2002-03-04a/runtime/Makefile.tail
--- klic-3.003-2002-03-04/runtime/Makefile.tail	Fri Jan 18 15:40:54 2002
+++ klic-3.003-2002-03-04a/runtime/Makefile.tail	Mon Mar  4 10:54:18 2002
@@ -5,7 +5,7 @@
 #       (Read COPYRIGHT-JIPDEC for detailed information.)
 # ----------------------------------------------------------
 
-SHMCFLAGS = $(CFLAGS) -DDEBUGLIB -DSHM -I../include
+SHMCFLAGS = $(CFLAGS) -DSHM -I../include
 DEFINITIONS=$(DISTCFLAGS) -I../include 
 KLIC =  ../compiler/klic -P$(PARALLEL) $(KLICOPT) \
 	-R -I../include -X. -K$(KL1CMP) -D../compiler/klicdb -v 
@@ -215,21 +215,21 @@
 	rm -f $@; $(LN) $? $@
 
 kmain-t.o: kmain-t.c
-	$(CC) $(CFLAGS) -DDEBUGLIB -I../include -c kmain-t.c
+	$(CC) $(CFLAGS) -I../include -c kmain-t.c
 debug-t.o: debug-t.c
-	$(CC) $(CFLAGS) -DDEBUGLIB -I../include -c debug-t.c
+	$(CC) $(CFLAGS) -I../include -c debug-t.c
 gc-t.o: gc-t.c
-	$(CC) $(CFLAGS) -DDEBUGLIB -I../include -c gc-t.c
+	$(CC) $(CFLAGS) -I../include -c gc-t.c
 faisus-t.o: faisus-t.c
-	$(CC) $(CFLAGS) -DDEBUGLIB -I../include -c faisus-t.c
+	$(CC) $(CFLAGS) -I../include -c faisus-t.c
 intrpt-t.o: intrpt-t.c
-	$(CC) $(CFLAGS) -DDEBUGLIB -I../include -c intrpt-t.c
+	$(CC) $(CFLAGS) -I../include -c intrpt-t.c
 print-t.o: print-t.c
-	$(CC) $(CFLAGS) -DDEBUGLIB -I../include -c print-t.c
+	$(CC) $(CFLAGS) -I../include -c print-t.c
 unify-t.o: unify-t.c
-	$(CC) $(CFLAGS) -DDEBUGLIB -I../include -c unify-t.c
+	$(CC) $(CFLAGS) -I../include -c unify-t.c
 sched-t.o: sched-t.c
-	$(CC) $(CFLAGS) -DDEBUGLIB -I../include -c sched-t.c
+	$(CC) $(CFLAGS) -I../include -c sched-t.c
 
 kmain-d.c: kmain.c
 	rm -f $@; $(LN) $? $@
@@ -454,7 +454,7 @@
 		$(NODSRCS) $(NODCSRCS) $(COMMONKL1CSRCS)
 	./mmakedepend -a -- $(DISTCFLAGS) -- \
 		$(KL1DSRCS) $(DISTSRCS) $(DSRCS) $(DDEBUGSRCS)
-	./mmakedepend -a -- $(CFLAGS) -DDEBUGLIB -I../include -- \
+	./mmakedepend -a -- $(CFLAGS) -I../include -- \
 		$(NODDEBUGSRCS) $(DEBUGSRCS)
 #	./makedepend -- $(CFLAGS)  -I../include -- $(SRCS)
 
diff -ruN klic-3.003-2002-03-04/runtime/alloc.c klic-3.003-2002-03-04a/runtime/alloc.c
--- klic-3.003-2002-03-04/runtime/alloc.c	Mon Feb 25 14:46:44 2002
+++ klic-3.003-2002-03-04a/runtime/alloc.c	Mon Mar  4 11:48:43 2002
@@ -5,6 +5,7 @@
 %       (Read COPYRIGHT-JIPDEC for detailed information.)
 ----------------------------------------------------------- */
 
+#include <assert.h>
 #include <stdlib.h>  /* NULL, malloc, realloc */
 #include <klic/basic.h>  /* fatalf */
 #include <klic/struct.h>
@@ -116,6 +117,16 @@
   set_new_space_top((q*) malloc_check(bytesize));
   set_old_space_top((q*) malloc_check(bytesize));
   reinit_alloc();
+}
+
+extern q*
+klic_alloc(size_t size)
+{
+  declare_globals;
+  q* p = heapp();
+
+  set_heapp(p + size);
+  return p;
 }
 
 extern void
diff -ruN klic-3.003-2002-03-04/runtime/config/pvm/runtime.mk.sh klic-3.003-2002-03-04a/runtime/config/pvm/runtime.mk.sh
--- klic-3.003-2002-03-04/runtime/config/pvm/runtime.mk.sh	Thu Dec 27 19:15:57 2001
+++ klic-3.003-2002-03-04a/runtime/config/pvm/runtime.mk.sh	Mon Mar  4 10:54:38 2002
@@ -21,7 +21,7 @@
 PVMLIBDIR = $PVM_ROOT/lib/$PVM_ARCH
 PVMLIB  = $PVMLIB
 
-DISTCFLAGS = \$(CFLAGS) -DDEBUGLIB -DDIST -I\$(PVMINC) -I../include
+DISTCFLAGS = \$(CFLAGS) -DDIST -I\$(PVMINC) -I../include
 
 DISTLDFLAGS = $DISTLDFLAGS
 
diff -ruN klic-3.003-2002-03-04/runtime/config/shm/runtime.mk.sh klic-3.003-2002-03-04a/runtime/config/shm/runtime.mk.sh
--- klic-3.003-2002-03-04/runtime/config/shm/runtime.mk.sh	Thu Dec 27 19:15:57 2001
+++ klic-3.003-2002-03-04a/runtime/config/shm/runtime.mk.sh	Mon Mar  4 10:54:49 2002
@@ -6,7 +6,7 @@
 #-----------------------------------------------------------
 cat <<GAZONK
 
-DISTCFLAGS = \$(CFLAGS) -DDEBUGLIB -DDIST -DSHM_DIST -I../include
+DISTCFLAGS = \$(CFLAGS) -DDIST -DSHM_DIST -I../include
 
 EXT_OTHER_HEADERS =
 
diff -ruN klic-3.003-2002-03-04/runtime/export_table.c klic-3.003-2002-03-04a/runtime/export_table.c
--- klic-3.003-2002-03-04/runtime/export_table.c	Mon Feb 25 14:58:49 2002
+++ klic-3.003-2002-03-04a/runtime/export_table.c	Mon Mar  4 11:04:56 2002
@@ -56,14 +56,12 @@
   struct exp_entry* poped_exp_entry;
 
   if (top_of_exp_freelist == NULL){
-    /*** for Debug ***
-     * int i;
-     * for( i=0; i<current_exp_size-1; i++ ){
-     *   if( exp_table[i].wec == 0 ){
-     *     ioeprintf("Export table reclaim error in entry %d\n", i);
-     *   }
-     * }
-     *** for Debug ***/
+    int i;
+    for( i=0; i < current_exp_size - 1; i++ ){
+      if( exp_table[i].wec == 0 ){
+        ioeprintf("Export table reclaim error in entry %d\n", i);
+      }
+    }
 
     {
       char* exp_alloc;
diff -ruN klic-3.003-2002-03-04/runtime/faisus.c klic-3.003-2002-03-04a/runtime/faisus.c
--- klic-3.003-2002-03-04/runtime/faisus.c	Mon Mar  4 10:39:39 2002
+++ klic-3.003-2002-03-04a/runtime/faisus.c	Mon Mar  4 11:47:46 2002
@@ -167,9 +167,9 @@
   q* reasonp;
 {
   declare_globals;
-  q* allocp = heapp();
+  q* allocp = klic_alloc(pred->arity + 2);
   struct goalrec* goal = (struct goalrec*) allocp;
-  allocp += pred->arity + 2;
+  allocp = heapp();
   goal->pred = pred;
 
   if (reasonp == NULL) {
@@ -291,7 +291,6 @@
   q* reasonp;
 {
   declare_globals;
-  q* allocp = heapp();
 
   while (reasonp != reasons) {
     /* suspension stack is not empty */
@@ -316,8 +315,7 @@
       if (is_generator_susp(susp->u)) {
         struct generator_susp* gsusp = generator_suspp(susp);
         q ref = gsusp->backpt;
-        q tmp = generic_generate(untag_generator_susp(gsusp->u.o), allocp);
-        allocp = heapp();
+        q tmp = generic_generate(untag_generator_susp(gsusp->u.o), heapp());
         if (tmp == 0) goto fin;
         derefone(ref) = tmp;
         value = tmp;
@@ -327,11 +325,9 @@
       value = tmp;
     ok:
       derefone(var) = value;
-      set_heapp(allocp);
       return 1;
     }
   }
  fin:
-  set_heapp(allocp);
   return 0;
 }
