PDInterpSysCallsDevelImpl.mesa
Michael Plass, November 17, 1983 4:40 pm
DIRECTORY Environment, Space, PDInterpSysCalls;
PDInterpSysCallsDevelImpl:
MONITOR
IMPORTS Space
EXPORTS PDInterpSysCalls
= BEGIN
AllocateSpace:
PUBLIC
ENTRY
PROC [words:
INT]
RETURNS [
LONG
POINTER] = {
ENABLE UNWIND => NULL;
pages: CARDINAL ← (words+Environment.wordsPerPage)/Environment.wordsPerPage;
RETURN [Space.ScratchMap[pages]]
};
FreeSpace:
PUBLIC
ENTRY
PROC [pointer:
LONG
POINTER] = {
ENABLE UNWIND => NULL;
[] ← Space.Unmap[pointer];
};
BadFreeSpaceRequest:
PUBLIC
ERROR =
CODE;
END.