heaph.inc 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1993,97 by the Free Pascal development team
  5. Heap manager interface section
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. const
  13. heapblocks : boolean=false;
  14. var
  15. heaporg,heapptr,heapend,heaperror,freelist : pointer;
  16. { Basic (TP7) functions }
  17. Procedure getmem(Var p:pointer;Size:Longint);
  18. Procedure freemem(Var p:pointer;Size:Longint);
  19. Function memavail:Longint;
  20. Function maxavail:Longint;
  21. Procedure mark(var p : pointer);
  22. Procedure release(var p : pointer);
  23. { Fpc Functions }
  24. Function heapsize : longint;
  25. Procedure markheap(var oldfreelist,oldheapptr : pointer);
  26. Procedure releaseheap(oldfreelist,oldheapptr : pointer);
  27. {$ifdef TEMPHEAP}
  28. { Temp Heap Functions }
  29. const
  30. allow_special : boolean =true;
  31. Procedure split_heap;
  32. Procedure switch_to_base_heap;
  33. Procedure switch_to_temp_heap;
  34. Procedure switch_heap;
  35. Procedure releasetempheap;
  36. Procedure gettempmem(var p : pointer;size : longint);
  37. {$endif TEMPHEAP}
  38. {
  39. $Log$
  40. Revision 1.6 1998-09-08 15:03:27 peter
  41. * moved getmem/freemem/memavail/maxavail to heaph.inc
  42. Revision 1.5 1998/07/02 14:11:30 michael
  43. Reinstated the heapsize function.
  44. Revision 1.3 1998/05/12 10:42:45 peter
  45. * moved getopts to inc/, all supported OS's need argc,argv exported
  46. + strpas, strlen are now exported in the systemunit
  47. * removed logs
  48. * removed $ifdef ver_above
  49. Revision 1.2 1998/04/21 10:23:15 peter
  50. + heapblocks
  51. }