Commit 402e356e authored by kasperl@chromium.org's avatar kasperl@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3375 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6d163d9f
......@@ -2901,6 +2901,11 @@ bool Heap::IdleNotification() {
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_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment