diff -ruN klic-3.003-2002-02-17b/include/klic/control.h klic-3.003-2002-02-17c/include/klic/control.h
--- klic-3.003-2002-02-17b/include/klic/control.h	Sun Feb 17 14:47:48 2002
+++ klic-3.003-2002-02-17c/include/klic/control.h	Sun Feb 17 15:11:27 2002
@@ -12,7 +12,6 @@
 
 /* runtime/faisus.c */
 extern void interrupt_goal(const struct predicate* pred, q* reasonp);
-extern void interrupt_goal0(const struct predicate* pred, q* reasonp);
 extern int check_stack_for_alternatively(q* reasonp);
 
 
diff -ruN klic-3.003-2002-02-17b/include/klic/g_basic.h klic-3.003-2002-02-17c/include/klic/g_basic.h
--- klic-3.003-2002-02-17b/include/klic/g_basic.h	Mon Dec 31 12:08:05 2001
+++ klic-3.003-2002-02-17c/include/klic/g_basic.h	Sun Feb 17 15:14:05 2002
@@ -82,12 +82,11 @@
  * from: type&
  * size > 0: offset_t
  * type: type cast or function returning q
- * allocp: q*
  * res: {GENERIC_GCREQUEST, GENERIC_SUCCEEDED}&
  */
-#define G_HEAPALLOC_WITH_CHECK(from,size,type,allocp,res) \
+#define G_HEAPALLOC_WITH_CHECK(from,size,type,res) \
 do{ \
-  if ((long) real_heaplimit <= (long) ((allocp) + (size))) { \
+  if ((long) real_heaplimit <= (long) (heapp() + (size))) { \
     this_more_space += (size); \
     heaplimit = 0; \
     (res) = GENERIC_GCREQUEST; \
diff -ruN klic-3.003-2002-02-17b/include/klic/gc_macro.h klic-3.003-2002-02-17c/include/klic/gc_macro.h
--- klic-3.003-2002-02-17b/include/klic/gc_macro.h	Sat Feb 16 11:45:28 2002
+++ klic-3.003-2002-02-17c/include/klic/gc_macro.h	Sun Feb 17 15:16:02 2002
@@ -236,7 +236,8 @@
 #define GC_TRY_TO_ALLOC(new, type, size, gc_request) \
 do{ \
   q res; \
-  G_HEAPALLOC_WITH_CHECK((new), (size), type, g_allocp, res); \
+  set_heapp(g_allocp); \
+  G_HEAPALLOC_WITH_CHECK((new), (size), type, res); \
   if (GC_GCREQUEST == res) goto gc_request; \
 }while(0)
 
@@ -298,7 +299,8 @@
 #define GCSET_NEWOBJ_FOR_NEW(newgobj,size) \
 do{ \
   q res; \
-  G_HEAPALLOC_WITH_CHECK((newgobj), (size), (GC_OBJ_TYPE *), g_allocp, res); \
+  set_heapp(g_allocp); \
+  G_HEAPALLOC_WITH_CHECK((newgobj), (size), (GC_OBJ_TYPE*), res); \
   if(GC_GCREQUEST == res){ \
     q var; \
     struct goalrec *goal; \
diff -ruN klic-3.003-2002-02-17b/include/klic/gd_macro.h klic-3.003-2002-02-17c/include/klic/gd_macro.h
--- klic-3.003-2002-02-17b/include/klic/gd_macro.h	Sat Feb 16 11:46:04 2002
+++ klic-3.003-2002-02-17c/include/klic/gd_macro.h	Sun Feb 17 15:17:36 2002
@@ -73,7 +73,8 @@
 #define GD_ALLOC_AREA(new,type,size) \
 do{ \
   q res; \
-  G_HEAPALLOC_WITH_CHECK((new), (size), type, g_allocp, res); \
+  set_heapp(g_allocp); \
+  G_HEAPALLOC_WITH_CHECK((new), (size), type, res); \
   if(GD_GCREQUEST == res){ \
     struct goalrec *goal; \
     g_allocp = \
@@ -87,7 +88,8 @@
 #define GD_ALLOC_AREA_FOR_NEW(new,type,size) \
 do{ \
   q res; \
-  G_HEAPALLOC_WITH_CHECK((new), (size), type, g_allocp, res); \
+  set_heapp(g_allocp); \
+  G_HEAPALLOC_WITH_CHECK((new), (size), type, res); \
   if(GD_GCREQUEST == res){ \
     q var; \
     struct goalrec *goal; \
@@ -103,7 +105,8 @@
 #define GDSET_NEWOBJ_FOR_NEW(newgobj,size) \
 do{ \
   q res; \
-  G_HEAPALLOC_WITH_CHECK((newgobj),(size),(GD_OBJ_TYPE *),g_allocp,res); \
+  set_heapp(g_allocp); \
+  G_HEAPALLOC_WITH_CHECK((newgobj), (size), (GD_OBJ_TYPE*), res); \
   if(GENERIC_GCREQUEST == res){ \
     q var; \
     struct goalrec *goal; \
@@ -118,8 +121,9 @@
 #define GDSET_NEWOBJ(newgobj) \
 do{ \
   q res; \
+  set_heapp(g_allocp); \
   G_HEAPALLOC_WITH_CHECK((newgobj), GD_OBJ_SIZE(GD_SELF), \
-			 (GD_OBJ_TYPE *),g_allocp,res); \
+			 (GD_OBJ_TYPE*), res); \
   if (GD_GCREQUEST == res) { \
     struct goalrec *goal; \
     g_allocp = \
diff -ruN klic-3.003-2002-02-17b/include/klic/gg_macro.h klic-3.003-2002-02-17c/include/klic/gg_macro.h
--- klic-3.003-2002-02-17b/include/klic/gg_macro.h	Sat Feb 16 11:46:48 2002
+++ klic-3.003-2002-02-17c/include/klic/gg_macro.h	Sun Feb 17 15:18:25 2002
@@ -174,8 +174,8 @@
 #define GGSET_NEWOBJ_FOR_NEW(newgobj, type) \
 do{ \
   q res; \
-  G_HEAPALLOC_WITH_CHECK((newgobj), GG_OBJ_SIZE, \
-			 type, g_allocp, res); \
+  set_heapp(g_allocp); \
+  G_HEAPALLOC_WITH_CHECK((newgobj), GG_OBJ_SIZE, type, res); \
   if(GG_GCREQUEST == res) { \
     q var; \
     struct goalrec *goal; \
diff -ruN klic-3.003-2002-02-17b/runtime/faisus.c klic-3.003-2002-02-17c/runtime/faisus.c
--- klic-3.003-2002-02-17b/runtime/faisus.c	Sun Feb 17 14:43:20 2002
+++ klic-3.003-2002-02-17c/runtime/faisus.c	Sun Feb 17 15:12:05 2002
@@ -171,14 +171,6 @@
   const struct predicate* pred;
   q* reasonp;
 {
-  interrupt_goal0(pred, reasonp);
-}
-
-extern void
-interrupt_goal0(pred, reasonp)
-  const struct predicate* pred;
-  q* reasonp;
-{
   declare_globals;
   q* allocp = heapp();
   struct goalrec* goal = (struct goalrec*) allocp;
diff -ruN klic-3.003-2002-02-17b/runtime/gmvv.c klic-3.003-2002-02-17c/runtime/gmvv.c
--- klic-3.003-2002-02-17b/runtime/gmvv.c	Fri Jan 11 10:31:26 2002
+++ klic-3.003-2002-02-17c/runtime/gmvv.c	Sun Feb 17 15:19:31 2002
@@ -624,8 +624,9 @@
   module decoder;
 
   /* GDSET_NEWOBJ_FOR_NEW(newvect, G_SIZE_IN_Q(GD_OBJ_TYPE)); */
+  set_heapp(g_allocp);
   G_HEAPALLOC_WITH_CHECK(newvect, G_SIZE_IN_Q(GD_OBJ_TYPE),
-                          (GD_OBJ_TYPE *), g_allocp, res);
+                          (GD_OBJ_TYPE*), res);
   /* G_HEAPALLOC(newvect, G_SIZE_IN_Q(GD_OBJ_TYPE), (GD_OBJ_TYPE*)); */
 
   if(GENERIC_GCREQUEST == res){
@@ -640,7 +641,8 @@
   newvect-> index = size = (long)GET_BUFFER(inbuf);
 
   /* GD_ALLOC_AREA_FOR_NEW(body, (q*), size); */
-  G_HEAPALLOC_WITH_CHECK(body, size, (q*), g_allocp, res); 
+  set_heapp(g_allocp);
+  G_HEAPALLOC_WITH_CHECK(body, size, (q*), res); 
   /* G_HEAPALLOC(body, size, (q*)); */
   if(GD_GCREQUEST == res){
       this_more_space += size;
diff -ruN klic-3.003-2002-02-17b/runtime/gstring.c klic-3.003-2002-02-17c/runtime/gstring.c
--- klic-3.003-2002-02-17b/runtime/gstring.c	Fri Jan 11 09:44:17 2002
+++ klic-3.003-2002-02-17c/runtime/gstring.c	Sun Feb 17 15:20:23 2002
@@ -665,8 +665,9 @@
   int i;
   q res;
 
+  set_heapp(g_allocp);
   G_HEAPALLOC_WITH_CHECK(newstring, G_SIZE_IN_Q(GD_OBJ_TYPE), 
-			  (GD_OBJ_TYPE *), g_allocp, res);
+			  (GD_OBJ_TYPE*), res);
   /* G_HEAPALLOC(newstring, G_SIZE_IN_Q(GD_OBJ_TYPE), (GD_OBJ_TYPE*)); */
 
   if(GENERIC_GCREQUEST == res){ 
@@ -684,7 +685,8 @@
 
   {
     q *tmpbody;
-    G_HEAPALLOC_WITH_CHECK(tmpbody, size, (q*), g_allocp, res); 
+    set_heapp(g_allocp);
+    G_HEAPALLOC_WITH_CHECK(tmpbody, size, (q*), res); 
     body = (unsigned char *) tmpbody;
   }
   /* G_HEAPALLOC(body, size, (unsigned char*)); */
