diff --git a/allocate.c b/allocate.c
--- a/allocate.c
+++ b/allocate.c
@@ -6,6 +6,8 @@
 #include "srdisk.h"
 #include <stdio.h>
 #include "max.h"
+#include <stdint.h>
+#include <inttypes.h>
 
 /******************** allocation calculations ************************/
 
@@ -154,6 +156,20 @@
       dword destsize = newf.subconf[i].size;
       if (origsize != destsize) {
         lastalloc = AllocMem(i);
+        if (verbose >= 6) {
+          printf("origsize=%08"PRIX32
+            " destsize=%08"PRIX32
+            " lastalloc=%08"PRIX32
+            " Kleft=%08"PRIX32
+            " i=%d"
+            "\n"
+            ,origsize
+            ,destsize
+            ,lastalloc
+            ,Kleft
+            ,i
+            );
+        }
         if (lastalloc != origsize) {
           disk_bad = 1;
         }
@@ -165,6 +181,16 @@
         Kleft -= lastalloc;
       }
       else {
+        if (verbose >= 6) {
+          printf("else branch Kleft=%08"PRIX32
+            " f.subconf[i].size=%08"PRIX32
+            " i=%d"
+            "\n"
+            ,Kleft
+            ,f.subconf[i].size
+            ,i
+            );
+        }
         Kleft -= f.subconf[i].size;
       }
     }
diff --git a/asmhelp.nas b/asmhelp.nas
--- a/asmhelp.nas
+++ b/asmhelp.nas
@@ -165,6 +165,7 @@
 ; extern word realloc_ems_handle(void far * allocs, word * pages);
 
 entry realloc_ems_handle
+int3
 	lframe near
 	lpar word, indirectpages
 	lpar dword, allocs
@@ -443,6 +444,7 @@
 ; extern word realloc_xms3_handle(void far * allocs, dword size);
 
 entry realloc_xms3_handle
+int3
 	lframe near
 	lpar dword, size
 	lpar dword, allocs
@@ -475,6 +477,7 @@
 ; extern word realloc_xms2_handle(void far * allocs, dword size);
 
 entry realloc_xms2_handle
+int3
 	lframe near
 	lpar dword, size
 	lpar dword, allocs
diff --git a/diskio.c b/diskio.c
--- a/diskio.c
+++ b/diskio.c
@@ -152,7 +152,7 @@
          MEM_UNKNOWN;
 }
 
-static dword physical_alloc(struct phys_interface_s *f, byte far *alloc,
+dword physical_alloc(struct phys_interface_s *f, byte far *alloc,
   dword currsize, dword size)
 {
   const int WinEnh = 0; /* Do not take Windows into account here */
diff --git a/resize.c b/resize.c
--- a/resize.c
+++ b/resize.c
@@ -11,6 +11,8 @@
 #include <assert.h>
 #include <libi86/malloc.h>
 #include "max.h"
+#include <stdint.h>
+#include <inttypes.h>
 #include <libi86/stdio.h>
 
 #define far __far
@@ -277,6 +279,15 @@
       if (SavingDiskAllocate(used_sectors) && f.current_size >= f.size)
         disk_bad = 0;
     }
+    if (verbose >= 6) {
+      printf("newf.size > f.size and !SavingDiskAllocate"
+        " newf.size=%08"PRIX32
+        " f.size=%08"PRIX32
+        "\n"
+        ,newf.size
+        ,f.size
+        );
+    }
     fatal("Failed to allocate memory");
   }
 
@@ -302,6 +313,15 @@
                          newf.system_sectors))
   {
     /* !!!! possible to do better */
+    if (verbose >= 6) {
+      printf("newf.size < f.size and !SavingDiskAllocate"
+        " newf.size=%08"PRIX32
+        " f.size=%08"PRIX32
+        "\n"
+        ,newf.size
+        ,f.size
+        );
+    }
     fatal("Failed to allocate memory");
   }
 
