Reviewers: Mads Ager, Description: 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.
Please review this at http://codereview.chromium.org/450007 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M bleeding_edge/src/heap.cc Index: bleeding_edge/src/heap.cc =================================================================== --- bleeding_edge/src/heap.cc (revision 3374) +++ bleeding_edge/src/heap.cc (working copy) @@ -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
