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
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

View file

@ -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;