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