mit-scheme-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MIT-Scheme-devel] [commit f372dae] Don't call OS_free_pages after G


From: Joe Marshall
Subject: Re: [MIT-Scheme-devel] [commit f372dae] Don't call OS_free_pages after GC flip. We don't resize the heap and we will be reusing it.
Date: Wed, 5 Oct 2011 17:24:28 -0700

On Tue, Oct 4, 2011 at 8:58 PM, Taylor R Campbell <address@hidden> wrote:
> Did you observe a problem
> whose source you isolated to the use of OS_free_pages?

Yes.

Short answer:  Here are before and after measurements of total GC time
for scheme compiling itself with various heap sizes:

              GC Time
--heap  Before  After

  8192   19120  17800
 16384   10980   8670
 32768    7350   4610
 65536    5000   2330

as you can see, it makes a big difference at the larger heap sizes.

Long answer:  it's complicated, but the two basic issues are that we
do not free anything for long enough to be worth it, and OS_free_pages
does too much work (it is linear in the number of pages and I suspect
that the implementation provides guarantees of zeroing out the physical
pages).  Although we free the physical pages, we reuse the virtual
space almost instantly, so the physical page gets unwired, zeroed,
and then rewired (shortly after) on each GC.

-- 
~jrm



reply via email to

[Prev in Thread] Current Thread [Next in Thread]