replaced calls to NEW by calls to ALLOCATE
This commit is contained in:
parent
5c7379738b
commit
f25570dd4e
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue