Browse Source

* properties outside classes not supported in 2.0.x

git-svn-id: branches/fixes_2_0@6730 -
Tomas Hajny 18 năm trước cách đây
mục cha
commit
8650573171
2 tập tin đã thay đổi với 9 bổ sung26 xóa
  1. 8 16
      rtl/os2/sysheap.inc
  2. 1 10
      rtl/os2/system.pas

+ 8 - 16
rtl/os2/sysheap.inc

@@ -47,6 +47,10 @@ var
   Int_HeapSize: cardinal;
 {$ENDIF EXTDUMPGROW}
 
+const
+ IntHeapAllocFlags = $53;
+ (* mfPag_Commit or mfObj_Tile or mfPag_Write or mfPag_Read *)
+
 {function GetHeapSize: longint; assembler;
 asm
   movl Int_HeapSize, %eax
@@ -69,7 +73,10 @@ begin
    WriteLn ('Trying to grow heap by ', Size, ' to ', Int_HeapSize);
 {$ENDIF}
 
-  RC := DosAllocMem (P, Size, HeapAllocFlags);
+  if UseHighMem then
+   RC := DosAllocMem (P, Size, IntHeapAllocFlags or $400)
+  else
+   RC := DosAllocMem (P, Size, IntHeapAllocFlags);
   if RC = 0 then
    begin
 {$IFDEF EXTDUMPGROW}
@@ -124,18 +131,3 @@ begin
    end;
 {$ENDIF EXTDUMPGROW}
 end;
-
-
-function ReadUseHighMem: boolean;
-begin
- ReadUseHighMem := HeapAllocFlags and $400 = $400;
-end;
-
-
-procedure WriteUseHighMem (B: boolean);
-begin
- if B then
-  HeapAllocFlags := HeapAllocFlags or $400
- else
-  HeapAllocFlags := HeapAllocFlags and not ($400);
-end;

+ 1 - 10
rtl/os2/system.pas

@@ -128,21 +128,12 @@ var
   ApplicationType: cardinal;
 
 const
- HeapAllocFlags: cardinal = $53; (* Compatible to VP/2 *)
- (* mfPag_Commit or mfObj_Tile or mfPag_Write or mfPag_Read *)
-
-function ReadUseHighMem: boolean;
-
-procedure WriteUseHighMem (B: boolean);
-
 (* Is allocation of memory above 512 MB address limit allowed? Initialized *)
 (* during initialization of system unit according to capabilities of the   *)
 (* underlying OS/2 version, can be overridden by user - heap is allocated  *)
 (* for all threads, so the setting isn't declared as a threadvar and       *)
 (* should be only changed at the beginning of the main thread if needed.   *)
-property 
-  UseHighMem: boolean read ReadUseHighMem write WriteUseHighMem;
-(* UseHighMem is provided for compatibility with 2.0.x. *)
+  UseHighMem: boolean;
   StackTop : PtrUInt;