brk's zero-fill behavior on VAXen

Paul McJones mcjones at jumbo.DEC.COM
Thu Nov 6 03:51:13 AEST 1986


---------

Arthur Olson notes that in section 2 of the UNIX Programmer's Manual,
there is no guarantee that memory newly allocated by brk/sbrk is zeroed;
someone else notes that System V does have such a guarantee.  I ran across
the following in section II of Ken Thompson's paper "UNIX Implementation"
(Bell System Technical Journal, Vol. 57, No.  6, Part 2, pp. 1931-1946):
"The contents of newly allocated primary memory is initialized to zero." I
believe many library routines and applications have come to depend on this
(perhaps by accident) and would fail if it was changed.


Paul McJones
DEC Systems Research Center, Palo Alto
decwrl!mcjones
mcjones at src.dec.com



More information about the Comp.unix.wizards mailing list