Kasper, just in case if you don't know it: AFAIK V8::IdleNotification
is only invoked for background tabs, so that change probably won't
help in the case of active tab (but I didn't double check it).
Recently Peter (pkasting) added it into memory purger, but AFAIK
currently this can be only invoked manually.

yours,
anton.

On Mon, Nov 30, 2009 at 10:58 AM,  <[email protected]> wrote:
> Revision: 3375
> Author: [email protected]
> Date: Sun Nov 29 23:57:32 2009
> Log: Clear the compilation cache just before starting to do mark-sweep
> garbage collections when receiving idle notifications. This allows
> us to get rid of source code strings and generated code in the
> heap that would otherwise be kept around in idle V8 instances.
> Review URL: http://codereview.chromium.org/450007
> http://code.google.com/p/v8/source/detail?r=3375
>
> Modified:
>  /branches/bleeding_edge/src/heap.cc
>
> =======================================
> --- /branches/bleeding_edge/src/heap.cc Tue Nov 24 06:10:06 2009
> +++ /branches/bleeding_edge/src/heap.cc Sun Nov 29 23:57:32 2009
> @@ -2901,6 +2901,11 @@
>      last_gc_count = gc_count_;
>
>    } else if (number_idle_notifications == kIdlesBeforeMarkSweep) {
> +    // Before doing the mark-sweep collections we clear the
> +    // compilation cache to avoid hanging on to source code and
> +    // generated code for cached functions.
> +    CompilationCache::Clear();
> +
>      CollectAllGarbage(false);
>      new_space_.Shrink();
>      last_gc_count = gc_count_;
>
> --
> v8-dev mailing list
> [email protected]
> http://groups.google.com/group/v8-dev
>

-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to