From f25570dd4e68b9bd8afc34c3d98f2a64f218c331 Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 15 Oct 1987 15:41:00 +0000 Subject: [PATCH] replaced calls to NEW by calls to ALLOCATE --- lang/m2/libm2/CSP.mod | 6 +++--- lang/m2/libm2/PascalIO.mod | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lang/m2/libm2/CSP.mod b/lang/m2/libm2/CSP.mod index 147780639..41644603f 100644 --- a/lang/m2/libm2/CSP.mod +++ b/lang/m2/libm2/CSP.mod @@ -160,7 +160,7 @@ IMPLEMENTATION MODULE CSP; BEGIN Pop(free, newprocess); IF newprocess = NIL THEN - NEW(newprocess); + ALLOCATE(newprocess,SIZE(ProcessDescriptor)); ALLOCATE(newprocess^.wsp, WorkSpaceSize) END; WITH newprocess^ DO @@ -195,7 +195,7 @@ IMPLEMENTATION MODULE CSP; PROCEDURE InitChannel(VAR ch: Channel); (* Initialize the channel ch *) BEGIN - NEW(ch); + ALLOCATE(ch, SIZE(ChannelDescriptor)); WITH ch^ DO InitQueue(senders); owner := NIL; @@ -335,7 +335,7 @@ IMPLEMENTATION MODULE CSP; BEGIN InitQueue(free); InitQueue(ready); - NEW(cp); + ALLOCATE(cp,SIZE(ProcessDescriptor)); WITH cp^ DO sons := 0; father := NIL diff --git a/lang/m2/libm2/PascalIO.mod b/lang/m2/libm2/PascalIO.mod index 541350d2e..774069fb7 100644 --- a/lang/m2/libm2/PascalIO.mod +++ b/lang/m2/libm2/PascalIO.mod @@ -110,7 +110,7 @@ IMPLEMENTATION MODULE PascalIO; text := text^.next; END; IF text = NIL THEN - NEW(text); + ALLOCATE(text,SIZE(IOBuf)); text^.next := head; head := text; END;