COMPACT.DEF 571 B

123456789101112131415161718192021
  1. DEFINITION MODULE Compact;
  2. TYPE
  3. HandleType=CARDINAL;
  4. MemRecP=POINTER TO MemRec;
  5. MemRec=RECORD
  6. Length:CARDINAL; (* The size of the data area *)
  7. Handle:HandleType; (* The external 'name' of this block *)
  8. Next:MemRecP; (* The next in the chain *)
  9. (* In fact all the data comes in here *)
  10. END;
  11. CONST
  12. NotAHandle=MAX(HandleType);
  13. SmallestAlloc=4;
  14. PROCEDURE Deallocate(x:HandleType);
  15. PROCEDURE DerefHandle(x:HandleType):ADDRESS;
  16. PROCEDURE Allocate(size:CARDINAL):HandleType;
  17. END Compact.