Browse Source

* getheapstatus fixes

peter 20 years ago
parent
commit
abb3f82ceb
3 changed files with 28 additions and 4 deletions
  1. 4 2
      compiler/cclasses.pas
  2. 19 1
      compiler/cutils.pas
  3. 5 1
      compiler/options.pas

+ 4 - 2
compiler/cclasses.pas

@@ -355,7 +355,6 @@ type
 
 
 implementation
 implementation
 
 
-
 {*****************************************************************************
 {*****************************************************************************
                                     Memory debug
                                     Memory debug
 *****************************************************************************}
 *****************************************************************************}
@@ -2367,7 +2366,10 @@ end;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.42  2005-02-28 15:38:38  marco
+  Revision 1.43  2005-03-04 16:49:22  peter
+    * getheapstatus fixes
+
+  Revision 1.42  2005/02/28 15:38:38  marco
    * getFPCheapstatus  (no, FPC HEAP, not FP CHEAP!)
    * getFPCheapstatus  (no, FPC HEAP, not FP CHEAP!)
 
 
   Revision 1.41  2005/02/14 17:13:06  peter
   Revision 1.41  2005/02/14 17:13:06  peter

+ 19 - 1
compiler/cutils.pas

@@ -42,6 +42,12 @@ interface
     var
     var
       internalerrorproc : procedure(i:longint);
       internalerrorproc : procedure(i:longint);
 
 
+{$ifndef HASGETFPCHEAPSTATUS}
+    type
+      TFPCHeapStatus = THeapStatus;
+    function GetFPCHeapStatus:TFPCHeapStatus;
+{$endif HASGETFPCHEAPSTATUS}
+
     {# Returns the minimal value between @var(a) and @var(b) }
     {# Returns the minimal value between @var(a) and @var(b) }
     function min(a,b : longint) : longint;{$ifdef USEINLINE}inline;{$endif}
     function min(a,b : longint) : longint;{$ifdef USEINLINE}inline;{$endif}
     function min(a,b : int64) : int64;{$ifdef USEINLINE}inline;{$endif}
     function min(a,b : int64) : int64;{$ifdef USEINLINE}inline;{$endif}
@@ -146,6 +152,15 @@ uses
   strings
   strings
   ;
   ;
 
 
+
+{$ifndef HASGETFPCHEAPSTATUS}
+    function GetFPCHeapStatus:TFPCHeapStatus;
+    begin
+      GetHeapStatus(result);
+    end;
+{$endif HASGETFPCHEAPSTATUS}
+
+
     var
     var
       uppertbl,
       uppertbl,
       lowertbl  : array[char] of char;
       lowertbl  : array[char] of char;
@@ -1224,7 +1239,10 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.49  2005-02-14 17:13:06  peter
+  Revision 1.50  2005-03-04 16:49:22  peter
+    * getheapstatus fixes
+
+  Revision 1.49  2005/02/14 17:13:06  peter
     * truncate log
     * truncate log
 
 
   Revision 1.48  2005/01/20 17:05:53  peter
   Revision 1.48  2005/01/20 17:05:53  peter

+ 5 - 1
compiler/options.pas

@@ -1781,6 +1781,7 @@ begin
   def_system_macro('NOSAVEREGISTERS');
   def_system_macro('NOSAVEREGISTERS');
   def_system_macro('SHORTSTRCOMPAREINREG');
   def_system_macro('SHORTSTRCOMPAREINREG');
   def_system_macro('HASGETHEAPSTATUS');
   def_system_macro('HASGETHEAPSTATUS');
+  def_system_macro('HASGETFPCHEAPSTATUS');
 
 
 { using a case is pretty useless here (FK) }
 { using a case is pretty useless here (FK) }
 { some stuff for TP compatibility }
 { some stuff for TP compatibility }
@@ -2101,7 +2102,10 @@ finalization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.168  2005-02-26 15:43:09  florian
+  Revision 1.169  2005-03-04 16:49:22  peter
+    * getheapstatus fixes
+
+  Revision 1.168  2005/02/26 15:43:09  florian
     * userdata in file/textrecs now 32 bytes
     * userdata in file/textrecs now 32 bytes
 
 
   Revision 1.167  2005/02/19 18:32:16  florian
   Revision 1.167  2005/02/19 18:32:16  florian