Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: src/heap.cc

Issue 4888002: [Isolates] Pass isolate to VMState constructor. (Closed)
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/handles.cc ('k') | src/isolate.h » ('j') | src/top.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 if (!CollectGarbage(OLD_POINTER_SPACE, MARK_COMPACTOR)) { 446 if (!CollectGarbage(OLD_POINTER_SPACE, MARK_COMPACTOR)) {
447 break; 447 break;
448 } 448 }
449 } 449 }
450 mark_compact_collector()->SetForceCompaction(false); 450 mark_compact_collector()->SetForceCompaction(false);
451 } 451 }
452 452
453 453
454 bool Heap::CollectGarbage(AllocationSpace space, GarbageCollector collector) { 454 bool Heap::CollectGarbage(AllocationSpace space, GarbageCollector collector) {
455 // The VM is in the GC state until exiting this function. 455 // The VM is in the GC state until exiting this function.
456 VMState state(GC); 456 VMState state(isolate_, GC);
457 457
458 #ifdef DEBUG 458 #ifdef DEBUG
459 // Reset the allocation timeout to the GC interval, but make sure to 459 // Reset the allocation timeout to the GC interval, but make sure to
460 // allow at least a few allocations after a collection. The reason 460 // allow at least a few allocations after a collection. The reason
461 // for this is that we have a lot of allocation sequences and we 461 // for this is that we have a lot of allocation sequences and we
462 // assume that a garbage collection will allow the subsequent 462 // assume that a garbage collection will allow the subsequent
463 // allocation attempts to go through. 463 // allocation attempts to go through.
464 allocation_timeout_ = Max(6, FLAG_gc_interval); 464 allocation_timeout_ = Max(6, FLAG_gc_interval);
465 #endif 465 #endif
466 466
(...skipping 4858 matching lines...) Expand 10 before | Expand all | Expand 10 after
5325 } 5325 }
5326 5326
5327 5327
5328 void ExternalStringTable::TearDown() { 5328 void ExternalStringTable::TearDown() {
5329 new_space_strings_.Free(); 5329 new_space_strings_.Free();
5330 old_space_strings_.Free(); 5330 old_space_strings_.Free();
5331 } 5331 }
5332 5332
5333 5333
5334 } } // namespace v8::internal 5334 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | src/isolate.h » ('j') | src/top.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698