home *** CD-ROM | disk | FTP | other *** search
Modula Definition | 1985-04-25 | 1.2 KB | 33 lines |
- DEFINITION MODULE Storage; (* to be used unchanged for MacIntosh by Franz Kronseder 30.01.85 *)
-
- (*--------------------------
- This is the management module for the heap segment. The definitions are
- exactly the same as on SMAKY8.
- *************************************************************************)
-
- FROM SYSTEM IMPORT ADDRESS;
-
- EXPORT QUALIFIED
- ALLOCATE, DEALLOCATE, Available, CreateHeap, DestroyHeap;
-
- PROCEDURE ALLOCATE (VAR addr : ADDRESS; amount : CARDINAL);
- (* allocates the requested amount of memory (in bytes) and returns the *)
- (* starting address . HALT if the amount is not available *)
-
- PROCEDURE DEALLOCATE (VAR addr : ADDRESS; amount : CARDINAL);
- (* deallocates the given amount of memory (in bytes). HALT if the *)
- (* memory hasn't been allocated by ALLOCATE *)
-
- PROCEDURE Available (amount : CARDINAL) : BOOLEAN;
- (* returns TRUE if an ALLOCATE of the specified amount (in bytes) *)
- (* of memory would be possible *)
-
- PROCEDURE CreateHeap (amount : CARDINAL);
- (* has no function in the current implementation *)
-
- PROCEDURE DestroyHeap;
- (* has no function in the current implementation *)
-
- END Storage.
-
-