brk's zero-fill behavior on VAXen

Daniel R. Levy levy at ttrdc.UUCP
Tue Nov 4 16:42:20 AEST 1986


In article <7208 at elsie.UUCP>, ado at elsie.UUCP (Arthur David Olson) writes:
>In section 2 of the UNIX Programmer's Manual, the description of the "brk" and
>"sbrk" calls note only that they change the system's notion of the lowest
>location not used by the program.  If the result of the call is to expand the
>address space of the process, there's no promise about the contents of the
>newly-available address space.  Yet on our VAX (and on yours, too, if you
>have one) the newly-available space is always zero filled.
>
>Can system performance be improved by avoiding zero filling of the new
>memory?

Possibly, but it would also create a security hole where one user could examine
random hunks of memory left behind by other users' processes.  Zeroing is the
quickest way to destroy this data.
-- 
 -------------------------------    Disclaimer:  The views contained herein are
|       dan levy | yvel nad      |  my own and are not at all those of my em-
|         an engihacker @        |  ployer or the administrator of any computer
| at&t computer systems division |  upon which I may hack.
|        skokie, illinois        |
 --------------------------------   Path: ..!{akgua,homxb,ihnp4,ltuxa,mvuxa,
	   go for it!  			allegra,ulysses,vax135}!ttrdc!levy



More information about the Comp.unix.wizards mailing list