Nat! bio photo

Nat!

Senior Mull

Twitter Github Twitch

Zero filling, the OS's problem ?

The best argument for zero filling pages in a single user setting I have heard so far is this (from darwin-dev@lists.apple.com)

http://www.macintouch.com/o98security.html

Basically it goes like this. Program TextEdit.app is used to write some text. That text ends up in the back of a memory page. When the program ends, that page is reused in another program lets say LISP or some such program that saves out complete memory pages (dumps an image). Now if that memory page is only partially overwritten the data edited in TextEdit.app might very well be appended at the end of that image file and if you then send this image to someone else, you may have sent some data out you rather wouldn't have liked to.

This Office effect is dealt on other systems deal by ignoring it (is this true ?), but Mac OS X is conscientious and zeroes out the memory page.