| Index: src/heap.cc
|
| diff --git a/src/heap.cc b/src/heap.cc
|
| index 2ba39198e1489427b56b57193ea04556695882e0..64812912272a07198db0780401fdad4f663d075b 100644
|
| --- a/src/heap.cc
|
| +++ b/src/heap.cc
|
| @@ -114,6 +114,7 @@ Heap::Heap()
|
| amount_of_external_allocated_memory_(0),
|
| amount_of_external_allocated_memory_at_last_global_gc_(0),
|
| old_gen_exhausted_(false),
|
| + inline_allocation_disabled_(false),
|
| store_buffer_rebuilder_(store_buffer()),
|
| hidden_string_(NULL),
|
| gc_safe_size_of_old_object_(NULL),
|
| @@ -6568,6 +6569,32 @@ intptr_t Heap::PromotedExternalMemorySize() {
|
| }
|
|
|
|
|
| +void Heap::EnableInlineAllocation() {
|
| + ASSERT(inline_allocation_disabled_);
|
| + inline_allocation_disabled_ = false;
|
| +
|
| + // Update inline allocation limit for new space.
|
| + new_space()->UpdateInlineAllocationLimit(0);
|
| +}
|
| +
|
| +
|
| +void Heap::DisableInlineAllocation() {
|
| + ASSERT(!inline_allocation_disabled_);
|
| + inline_allocation_disabled_ = true;
|
| +
|
| + // Update inline allocation limit for new space.
|
| + new_space()->UpdateInlineAllocationLimit(0);
|
| +
|
| + // Update inline allocation limit for old spaces.
|
| + PagedSpaces spaces(this);
|
| + for (PagedSpace* space = spaces.next();
|
| + space != NULL;
|
| + space = spaces.next()) {
|
| + space->EmptyAllocationInfo();
|
| + }
|
| +}
|
| +
|
| +
|
| V8_DECLARE_ONCE(initialize_gc_once);
|
|
|
| static void InitializeGCOnce() {
|
|
|