[gclist] Re: gclist-digest V3 #106
Wed, 20 Sep 2000 13:30:49 +0100
At 2000-09-18 15:07:26+0000, Mario Wolczko writes:
> > Only if you have a requirement for it to be zero. Why would you have
> > such a requirement?
> If your language specifies that fields have to be initialized to zero,
> and your compiler can't determine when the user code is relying on
> that (e.g., a JIT compiler for a Java VM that doesn't have the time to
> do the flow analysis over all the constructors).
OK. Many memory managers have no such language requirement
(e.g. C/C++), or have a stronger language requirement (e.g. SML), or
have different implementation characteristics (e.g. a smarter but
slower compiler, which can do the inference, or a more stupid
compiler, which doesn't bother to infer anything but will always
zero-fill, or a language in which the necessary inference is easier).
For such memory managers, a source of pages with "don't care" contents
may be a worthwhile optimisation. Note that the saving is that the OS
need not zero-fill so many pages, so the benefits of the optimisation
may not visibly accrue to the process making use of it (the time for
the OS to zero-fill a page may be accounted to the process which most
recently used it, or to some OS process, or it may take place in OS
FreeBSD 2.2.8-RELEASE: up 24 days, 16:40
last reboot Sat Aug 26 21:11 (lightning strike)