replaced calls to NEW by calls to ALLOCATE

This commit is contained in:
ceriel 1987-10-15 15:41:00 +00:00
parent 5c7379738b
commit f25570dd4e
2 changed files with 4 additions and 4 deletions

View file

@ -160,7 +160,7 @@ IMPLEMENTATION MODULE CSP;
BEGIN BEGIN
Pop(free, newprocess); Pop(free, newprocess);
IF newprocess = NIL THEN IF newprocess = NIL THEN
NEW(newprocess); ALLOCATE(newprocess,SIZE(ProcessDescriptor));
ALLOCATE(newprocess^.wsp, WorkSpaceSize) ALLOCATE(newprocess^.wsp, WorkSpaceSize)
END; END;
WITH newprocess^ DO WITH newprocess^ DO
@ -195,7 +195,7 @@ IMPLEMENTATION MODULE CSP;
PROCEDURE InitChannel(VAR ch: Channel); PROCEDURE InitChannel(VAR ch: Channel);
(* Initialize the channel ch *) (* Initialize the channel ch *)
BEGIN BEGIN
NEW(ch); ALLOCATE(ch, SIZE(ChannelDescriptor));
WITH ch^ DO WITH ch^ DO
InitQueue(senders); InitQueue(senders);
owner := NIL; owner := NIL;
@ -335,7 +335,7 @@ IMPLEMENTATION MODULE CSP;
BEGIN BEGIN
InitQueue(free); InitQueue(free);
InitQueue(ready); InitQueue(ready);
NEW(cp); ALLOCATE(cp,SIZE(ProcessDescriptor));
WITH cp^ DO WITH cp^ DO
sons := 0; sons := 0;
father := NIL father := NIL

View file

@ -110,7 +110,7 @@ IMPLEMENTATION MODULE PascalIO;
text := text^.next; text := text^.next;
END; END;
IF text = NIL THEN IF text = NIL THEN
NEW(text); ALLOCATE(text,SIZE(IOBuf));
text^.next := head; text^.next := head;
head := text; head := text;
END; END;