diff -ruN klic-3.003-2002-02-22c/runtime/asyncio.c klic-3.003-2002-02-22d/runtime/asyncio.c
--- klic-3.003-2002-02-22c/runtime/asyncio.c	Tue Feb 19 15:14:54 2002
+++ klic-3.003-2002-02-22d/runtime/asyncio.c	Fri Feb 22 11:41:09 2002
@@ -42,10 +42,6 @@
 
 /* This function may be called from itimer interrupt handler */
 
-#define Call_sigio_handler(again, allocp, fd, type) \
-  ((again = sigio_handlers[fd](allocp, fd, type, &fdsr, &fdsw)),\
-   (allocp = heapp()) )
-
 int debugger_flag;
 
 static int
@@ -59,10 +55,13 @@
     static int retry_fd;
     static enum sigiotype retry_sigio_type = KLIC_SIGIO_NONE;
 
+    set_heapp(allocp);
     if (retry_sigio_type != KLIC_SIGIO_NONE) {
       int fd = retry_fd;
       int again;
+      set_heapp(allocp);
       again = (sigio_handlers[fd])(allocp, fd, retry_sigio_type, &fdsr, &fdsw);
+      allocp = heapp();
       if (again)
 	return 1;
       allocp = heapp();
@@ -116,7 +115,9 @@
 	    default:
 	      continue;
 	    }
+	    set_heapp(allocp);
 	    again = sigio_handlers[fd](allocp, fd, call_type, &fdsr, &fdsw);
+	    allocp = heapp();
 	    if (again) {
 	      retry_fd = fd;
 	      retry_sigio_type = call_type;
@@ -201,6 +202,7 @@
 {
   declare_globals;
   q* array = asyncio_streams;
+  set_heapp(allocp);
   if (array[fd] == 0) {
     klic_fprintf(stderr, "Unexpected IO interrupt for fd %d ignored\n", fd);
   } else {
