Browse Source

+ Removed references to old memory manager functions

michael 20 years ago
parent
commit
cd78175fec
2 changed files with 12 additions and 120 deletions
  1. 11 30
      docs/prog.tex
  2. 1 90
      docs/system.xml

+ 11 - 30
docs/prog.tex

@@ -4232,7 +4232,7 @@ More information on using the \var{heaptrc} mechanism can be found in the
 \subsection{Writing your own memory manager}
 \subsection{Writing your own memory manager}
 
 
 \fpc allows you to write and use your own memory manager. The standard
 \fpc allows you to write and use your own memory manager. The standard
-functions \var{GetMem}, \var{FreeMem}, \var{ReallocMem} and \var{Maxavail}
+functions \var{GetMem}, \var{FreeMem}, \var{ReallocMem} etc.
 use a special record in the \file{system} unit to do the actual memory management.
 use a special record in the \file{system} unit to do the actual memory management.
 The \file{system} unit initializes this record with the \file{system} unit's own memory
 The \file{system} unit initializes this record with the \file{system} unit's own memory
 manager, but you can read and set this record using the
 manager, but you can read and set this record using the
@@ -4251,9 +4251,8 @@ the \var{TMemoryManager} record is defined as follows:
     AllocMem    : Function(Size:longint):Pointer;
     AllocMem    : Function(Size:longint):Pointer;
     ReAllocMem  : Function(var p:pointer;Size:longint):Pointer;
     ReAllocMem  : Function(var p:pointer;Size:longint):Pointer;
     MemSize     : function(p:pointer):Longint;
     MemSize     : function(p:pointer):Longint;
-    MemAvail    : Function:Longint;
-    MaxAvail    : Function:Longint;
-    HeapSize    : Function:Longint;
+    GetHeapStatus       : function :THeapStatus;
+    GetFPCHeapStatus    : function :TFPCHeapStatus;
   end;
   end;
 \end{verbatim}
 \end{verbatim}
 
 
@@ -4288,11 +4287,12 @@ behaviour is equivalent to \var{GetMem}.
 \item[MemSize] should return the total amount of memory available for
 \item[MemSize] should return the total amount of memory available for
 allocation. This function may return zero if the memory manager does not
 allocation. This function may return zero if the memory manager does not
 allow to determine this information.
 allow to determine this information.
-\item[MaxAvail] should return the size of the largest block of memory that
-is still available for allocation. This function may return zero if the
-memory manager does not allow to determine this information.
-\item[HeapSize] should return the total size of the heap. This may be zero
-is the memory manager does not allow to determine this information.
+\item[GetHeapStatus] should return a \var{THeapStatus} record with the
+status of the memory manager. This record should be filled with
+Delphi-compliant values.
+\item[GetHeapStatus] should return a \var{TFPCHeapStatus} record with the
+status of the memory manager. This record should be filled with
+FPC-Compliant values.
 \end{description}
 \end{description}
 To implement your own memory manager, it is sufficient to construct such a
 To implement your own memory manager, it is sufficient to construct such a
 record and to issue a call to \var{SetMemoryManager}.
 record and to issue a call to \var{SetMemoryManager}.
@@ -4370,24 +4370,6 @@ begin
   Result:=0;
   Result:=0;
 end;
 end;
 
 
-Function CMemAvail : Longint;
-
-begin
-  Result:=0;
-end;
-
-Function CMaxAvail: Longint;
-
-begin
-  Result:=0;
-end;
-
-Function CHeapSize : Longint;
-
-begin
-  Result:=0;
-end;
-
 
 
 Const
 Const
  CMemoryManager : TMemoryManager =
  CMemoryManager : TMemoryManager =
@@ -4398,9 +4380,8 @@ Const
       AllocMem : CAllocMem;
       AllocMem : CAllocMem;
       ReallocMem : CReAllocMem;
       ReallocMem : CReAllocMem;
       MemSize : CMemSize;
       MemSize : CMemSize;
-      MemAvail : CMemAvail;
-      MaxAvail : MaxAvail;
-      HeapSize : CHeapSize;
+      GetHeapStatus : Nil;
+      GetFPCHeapStatus : Nil;
     );
     );
 
 
 Var
 Var

+ 1 - 90
docs/system.xml

@@ -216,8 +216,6 @@ The heap manager uses the <var>TMemoryManager</var> type:
     AllocMem    : Function(Size:longint):Pointer;
     AllocMem    : Function(Size:longint):Pointer;
     ReAllocMem  : Function(var p:pointer;Size:longint):Pointer;
     ReAllocMem  : Function(var p:pointer;Size:longint):Pointer;
     MemSize     : function(p:pointer):Longint;
     MemSize     : function(p:pointer):Longint;
-    MemAvail    : Function:Longint;
-    MaxAvail    : Function:Longint;
     HeapSize    : Function:Longint;
     HeapSize    : Function:Longint;
   end;
   end;
 </code>
 </code>
@@ -2246,72 +2244,6 @@ None.
 
 
 
 
 
 
-<element name="Mark">
-<short>Mark current memory position</short>
-<descr>
-This routine is here for compatibility with Turbo Pascal, but
-it is not implemented and currently does nothing.
-</descr>
-<errors>
-None.
-</errors>
-<seealso>
-<link id="Getmem"/>
-<link id="Freemem"/>
-<link id="New"/>
-<link id="Dispose"/>
-<link id="Maxavail"/>
-</seealso>
-</element>
-
-<element name="Maxavail">
-<short>Return size of largest free memory block</short>
-<descr>
-<p>
-<var>Maxavail</var> returns the size, in bytes, of the biggest free memory block in
-the heap.
-</p>
-<remark>
-The heap grows dynamically if more memory is needed than is available.
-</remark>
-</descr>
-<errors>
-None.
-</errors>
-<seealso>
-<link id="Memavail"/>
-<link id="Freemem"/>
-<link id="Getmem"/>
-</seealso>
-<example file="refex/ex40"/>
-</element>
-
-
-
-<element name="Memavail">
-<short>Return total available memory</short>
-<descr>
-<p>
-<var>Memavail</var> returns the size, in bytes, of the free heap memory.
-</p>
-<remark>
-The heap grows dynamically if more memory is needed than is available. The
-heap size is not equal to the size of the memory available to the
-operating system, it is internal to the programs created by Free Pascal.
-</remark>
-</descr>
-<errors>
-None.
-</errors>
-<seealso>
-<link id="Maxavail"/>
-<link id="Freemem"/>
-<link id="Getmem"/>
-</seealso>
-<example file="refex/ex41"/>
-</element>
-
-
 
 
 <element name="Mkdir">
 <element name="Mkdir">
 <short>Create a new directory.</short>
 <short>Create a new directory.</short>
@@ -2751,33 +2683,12 @@ can be assigned directly to a double or extended.
 <errors>
 <errors>
 None.
 None.
 </errors>
 </errors>
-<seealso>
-</seealso>
+<seealso></seealso>
 <example file="refex/ex110"/>
 <example file="refex/ex110"/>
 </element>
 </element>
 
 
 
 
 
 
-<element name="Release">
-<short>Release memory above mark point</short>
-<descr>
-This routine is here for compatibility with Turbo Pascal, but
-it is not implemented and currently does nothing.
-</descr>
-<errors>
-None.
-</errors>
-<seealso>
-<link id="Mark"/>
-<link id="Memavail"/>
-<link id="Maxavail"/>
-<link id="Getmem"/>
-<link id="Freemem"/>
-<link id="New"/>
-<link id="Dispose"/>
-</seealso>
-</element>
-
 <element name="Rename">
 <element name="Rename">
 <short>Rename file on disk</short>
 <short>Rename file on disk</short>
 <descr>
 <descr>