STORAGE.LST 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. Listing:
  2. 1 (* Release 3.10 *)
  3. 2 (*-------------------------------------------------------------------------*
  4. 3 * *
  5. 4 * STORAGE.DEF - Modula-2 synamic memory allocation *
  6. 5 * *
  7. 6 * COPYRIGHT (C) 1987..1992 Clarion Software Corporation. *
  8. 7 * All Rights Reserved *
  9. 8 * *
  10. 9 *--------------------------------------------------------------------------*)
  11. 10
  12. 11 (*# call(o_a_copy => on,
  13. 12 o_a_size => on) *)
  14. 13 (*%F _fdata *)
  15. 14 (*# call(seg_name => null) *)
  16. 15 (*# data(seg_name => null) *)
  17. 16 (*%E *)
  18. 17 (*%T _fdata *)
  19. 18 (*# call(ds_entry=>null) *)
  20. 19 (*%E *)
  21. 20 (*# module(implementation=>off) *)
  22. 21
  23. 22
  24. 23 DEFINITION MODULE Storage;
  25. 24
  26. 25 IMPORT SYSTEM;
  27. 26
  28. 27 (*# save, data(near_ptr=> off) *)
  29. 28 TYPE
  30. 29 FarHeapRecPtr = POINTER TO FarHeapRec;
  31. ***** ^ undeclared identifier
  32. 30 FarHeapRec = RECORD
  33. 31 size : CARDINAL;
  34. 32 next : FarHeapRecPtr;
  35. 33 END;
  36. ***** ^ not supported yet
  37. 34 (*# restore *)
  38. 35
  39. 36 (*# save, data(near_ptr=> on) *)
  40. 37 TYPE
  41. 38 NearHeapRecPtr = POINTER TO NearHeapRec;
  42. ***** ^ undeclared identifier
  43. 39 NearHeapRec = RECORD
  44. 40 size : CARDINAL;
  45. 41 next : NearHeapRecPtr;
  46. 42 END;
  47. ***** ^ not supported yet
  48. 43 (*# restore *)
  49. 44
  50. 45 (* Main heap procedures *)
  51. 46
  52. 47 PROCEDURE FarAllocate (VAR a: FarADDRESS; size: CARDINAL);
  53. ***** ^ undeclared identifier
  54. 48
  55. 49 PROCEDURE FarDeallocate(VAR a: FarADDRESS; size: CARDINAL);
  56. ***** ^ undeclared identifier
  57. 50
  58. 51 PROCEDURE FarAvailable(size: CARDINAL ): BOOLEAN;
  59. 52
  60. 53 PROCEDURE NearAllocate (VAR a: NearADDRESS; size: CARDINAL);
  61. ***** ^ undeclared identifier
  62. 54
  63. 55 PROCEDURE NearDeallocate(VAR a: NearADDRESS; size: CARDINAL);
  64. ***** ^ undeclared identifier
  65. 56
  66. 57 PROCEDURE NearAvailable(size: CARDINAL ): BOOLEAN;
  67. 58
  68. 59
  69. 60 PROCEDURE FarMakeHeap(Source: CARDINAL; Size: CARDINAL): FarHeapRecPtr;
  70. 61
  71. 62 PROCEDURE FarHeapAllocate(Source: FarHeapRecPtr; VAR A: FarADDRESS; Size: CARDINAL);
  72. ***** ^ undeclared identifier
  73. 63
  74. 64 PROCEDURE FarHeapAvail(Source: FarHeapRecPtr): CARDINAL;
  75. 65
  76. 66 PROCEDURE FarHeapTotalAvail(Source: FarHeapRecPtr): CARDINAL;
  77. 67
  78. 68 PROCEDURE FarHeapDeallocate(Source: FarHeapRecPtr; VAR A: FarADDRESS; Size: CARDINAL );
  79. ***** ^ undeclared identifier
  80. 69
  81. 70 PROCEDURE FarHeapChangeAlloc(Source: FarHeapRecPtr; A: FarADDRESS;
  82. ***** ^ undeclared identifier
  83. 71 OldSize, NewSize : CARDINAL): BOOLEAN;
  84. 72
  85. 73 PROCEDURE FarHeapChangeSize(Source : FarHeapRecPtr; VAR A: FarADDRESS;
  86. ***** ^ undeclared identifier
  87. 74 OldSize, NewSize : CARDINAL );
  88. 75
  89. 76
  90. 77 PROCEDURE NearMakeHeap(Source: NearADDRESS; Size: CARDINAL): NearHeapRecPtr;
  91. ***** ^ undeclared identifier
  92. 78
  93. 79 PROCEDURE NearHeapAllocate(Source: NearHeapRecPtr; VAR A: NearADDRESS; Size: CARDINAL);
  94. ***** ^ undeclared identifier
  95. 80
  96. 81 PROCEDURE NearHeapAvail(Source: NearHeapRecPtr): CARDINAL;
  97. 82
  98. 83 PROCEDURE NearHeapTotalAvail(Source: NearHeapRecPtr): CARDINAL;
  99. 84
  100. 85 PROCEDURE NearHeapDeallocate(Source: NearHeapRecPtr; VAR A: NearADDRESS; Size: CARDINAL );
  101. ***** ^ undeclared identifier
  102. 86
  103. 87 PROCEDURE NearHeapChangeAlloc(Source: NearHeapRecPtr; A: NearADDRESS;
  104. ***** ^ undeclared identifier
  105. 88 OldSize, NewSize : CARDINAL): BOOLEAN;
  106. 89
  107. 90 PROCEDURE NearHeapChangeSize(Source : NearHeapRecPtr; VAR A: NearADDRESS;
  108. ***** ^ undeclared identifier
  109. 91 OldSize, NewSize : CARDINAL );
  110. 92
  111. 93
  112. 94 PROCEDURE SegAllocate(Size: CARDINAL): CARDINAL;
  113. 95
  114. 96 PROCEDURE SegDeallocate(Sel: CARDINAL; Size: CARDINAL);
  115. 97
  116. 98 (*%T _fptr *)
  117. 99 CONST
  118. 100 HeapRecPtr ::= FarHeapRecPtr;
  119. ***** ^ not supported yet
  120. 101 HeapRec ::= FarHeapRec;
  121. ***** ^ not supported yet
  122. 102 ALLOCATE = FarAllocate;
  123. ***** ^ not supported yet
  124. 103 DEALLOCATE = FarDeallocate;
  125. ***** ^ not supported yet
  126. 104 Available = FarAvailable;
  127. ***** ^ not supported yet
  128. 105 MakeHeap = FarMakeHeap;
  129. ***** ^ not supported yet
  130. 106 HeapAllocate = FarHeapAllocate;
  131. ***** ^ not supported yet
  132. 107 HeapAvail = FarHeapAvail;
  133. ***** ^ not supported yet
  134. 108 HeapTotalAvail = FarHeapTotalAvail;
  135. ***** ^ not supported yet
  136. 109 HeapDeallocate = FarHeapDeallocate;
  137. ***** ^ not supported yet
  138. 110 HeapChangeAlloc = FarHeapChangeAlloc;
  139. ***** ^ not supported yet
  140. 111 HeapChangeSize = FarHeapChangeSize;
  141. ***** ^ not supported yet
  142. 112 (*%E *)
  143. 113
  144. 114 (*%F _fptr *)
  145. 115 CONST
  146. 116 HeapRecPtr ::= NearHeapRecPtr;
  147. 117 HeapRec ::= NearHeapRec;
  148. 118 ALLOCATE = NearAllocate;
  149. 119 DEALLOCATE = NearDeallocate;
  150. 120 Available = NearAvailable;
  151. 121 MakeHeap = NearMakeHeap;
  152. 122 HeapAllocate = NearHeapAllocate;
  153. 123 HeapAvail = NearHeapAvail;
  154. 124 HeapTotalAvail = NearHeapTotalAvail;
  155. 125 HeapDeallocate = NearHeapDeallocate;
  156. 126 HeapChangeAlloc = NearHeapChangeAlloc;
  157. 127 HeapChangeSize = NearHeapChangeSize;
  158. 128 (*%E *)
  159. 129
  160. 130 VAR
  161. 131 MainHeap: FarHeapRecPtr;
  162. ***** ^ not supported yet
  163. 132 NearHeap: NearHeapRecPtr;
  164. ***** ^ not supported yet
  165. 133 ClearOnAllocate : BOOLEAN;
  166. 134 Check: BOOLEAN;
  167. 135
  168. 136 END Storage.
  169. ***** ^ not supported yet
  170. 32 errors