瀏覽代碼

* corrected a bug introduced by my last change
(allocating 1Mb but only using a small part !!)

pierre 27 年之前
父節點
當前提交
d5df96ef6a
共有 2 個文件被更改,包括 20 次插入4 次删除
  1. 10 2
      rtl/i386/heap.inc
  2. 10 2
      rtl/m68k/heap.inc

+ 10 - 2
rtl/i386/heap.inc

@@ -945,7 +945,11 @@ begin
    { Allocate by 64K size }
    { first try 1Meg }
    if size<$100000 then
-     NewPos:=Sbrk($100000)
+     begin
+        NewPos:=Sbrk($100000);
+        if NewPos > 0 then
+          size:=$100000;
+     end
    else
      NewPos:=SBrk(size);
    { try again }
@@ -1064,7 +1068,11 @@ end;
 
 {
   $Log$
-  Revision 1.15  1998-08-24 14:44:04  pierre
+  Revision 1.16  1998-08-25 14:15:51  pierre
+    * corrected a bug introduced by my last change
+      (allocating 1Mb but only using a small part !!)
+
+  Revision 1.15  1998/08/24 14:44:04  pierre
     * bug allocation of more than 1 MB failed corrected
 
   Revision 1.14  1998/07/30 13:26:21  michael

+ 10 - 2
rtl/m68k/heap.inc

@@ -950,7 +950,11 @@ begin
    { Allocate by 64K size }
    { first try 1Meg }
    if Size<$100000 then
-     NewPos:=Sbrk($100000)
+     begin
+        NewPos:=Sbrk($100000);
+        if NewPos > 0 then
+          Size:=$100000;
+     end
    else
      NewPos:=Sbrk(size);
    if NewPos=-1 then
@@ -1070,7 +1074,11 @@ end;
 
 {
   $Log$
-  Revision 1.6  1998-08-24 14:44:05  pierre
+  Revision 1.7  1998-08-25 14:15:53  pierre
+    * corrected a bug introduced by my last change
+      (allocating 1Mb but only using a small part !!)
+
+  Revision 1.6  1998/08/24 14:44:05  pierre
     * bug allocation of more than 1 MB failed corrected
 
   Revision 1.5  1998/08/17 12:27:17  carl