DEFINITION MODULE Alloc;

        (********************************************************)
        (*                                                      *)
        (*     ALLOCATE, with an added out-of-memory check      *)
        (*                                                      *)
        (*  Programmer:         P. Moylan                       *)
        (*  Started:            14 October 2025                 *)
        (*  Last edited:        14 October 2025                 *)
        (*  Status:             Just started                    *)
        (*                                                      *)
        (********************************************************)


IMPORT SYSTEM;


PROCEDURE ALLOCATE (VAR (*INOUT*) q: SYSTEM.ADDRESS;  size: CARDINAL);

    (* Like Storage.ALLOCATE, but with out-of-memory check. *)

PROCEDURE DEALLOCATE (VAR (*INOUT*) q: SYSTEM.ADDRESS;  size: CARDINAL);

    (* Same as Storage.DEALLOCATE. *)

END Alloc.

