33 using namespace v8::internal;
36 static void VerifyRegionMarking(
Address page_start) {
37 #ifdef ENABLE_CARDMARKING_WRITE_BARRIER
40 p->SetRegionMarks(Page::kAllRegionsCleanMarks);
42 for (
Address addr = p->ObjectAreaStart();
43 addr < p->ObjectAreaEnd();
48 for (
Address addr = p->ObjectAreaStart();
49 addr < p->ObjectAreaEnd();
54 for (
Address addr = p->ObjectAreaStart();
55 addr < p->ObjectAreaEnd();
80 p->SetIsLargeObjectPage(
false);
94 VerifyRegionMarking(page_start);
109 old_allocator_(isolate->memory_allocator_) {
110 isolate->memory_allocator_ = allocator;
114 isolate_->memory_allocator_ = old_allocator_;
129 Isolate* isolate = Isolate::Current();
143 Page* first_page = memory_allocator->AllocatePage(
146 first_page->
InsertAfter(faked_space.anchor()->prev_page());
147 CHECK(first_page->is_valid());
148 CHECK(first_page->next_page() == faked_space.anchor());
151 for (
Page* p = first_page; p != faked_space.anchor(); p = p->
next_page()) {
156 Page* other = memory_allocator->AllocatePage(
162 for (
Page* p = first_page; p != faked_space.anchor(); p = p->
next_page()) {
166 CHECK(total_pages == page_count);
170 memory_allocator->Free(first_page);
171 memory_allocator->Free(second_page);
172 memory_allocator->TearDown();
173 delete memory_allocator;
179 Isolate* isolate = Isolate::Current();
191 HEAP->ReservedSemiSpaceSize()));
202 memory_allocator->TearDown();
203 delete memory_allocator;
209 Isolate* isolate = Isolate::Current();
233 delete memory_allocator;
246 CHECK(obj->IsHeapObject());
259 if (!maybe_obj->ToObject(&obj))
break;
MUST_USE_RESULT MaybeObject * AllocateRaw(int size_in_bytes)
static MemoryChunk * FromAddress(Address a)
static HeapObject * cast(Object *obj)
Address OffsetToAddress(int offset)
static const int kPageSize
~TestMemoryAllocatorScope()
intptr_t MaxOldGenerationSize()
bool ConfigureHeapDefault()
TestMemoryAllocatorScope(Isolate *isolate, MemoryAllocator *allocator)
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
T RoundUp(T x, intptr_t m)
static const int kMaxNonCodeHeapObjectSize
MaybeObject * FindObject(Address a)
static const int kObjectStartOffset
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination trace on stack replacement optimize closures functions with arguments object optimize functions containing for in loops profiler considers IC stability primitive functions trigger their own optimization re try self optimization if it failed insert an interrupt check at function exit execution budget before interrupt is triggered call count before self optimization self_optimization count_based_interrupts weighted_back_edges trace_opt emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of SAHF instruction if available(X64 only)") DEFINE_bool(enable_vfp3
bool Contains(HeapObject *obj)
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination trace on stack replacement optimize closures functions with arguments object optimize functions containing for in loops profiler considers IC stability primitive functions trigger their own optimization re try self optimization if it failed insert an interrupt check at function exit execution budget before interrupt is triggered call count before self optimization self_optimization count_based_interrupts weighted_back_edges trace_opt emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of SAHF instruction if enable use of VFP3 instructions if available this implies enabling ARMv7 enable use of ARMv7 instructions if enable use of MIPS FPU instructions if NULL
void InitializeLoggingAndCounters()
void InsertAfter(MemoryChunk *other)
bool SetUp(int reserved_semispace_size_, int max_semispace_size)
void DeleteArray(T *array)
MUST_USE_RESULT MaybeObject * AllocateRaw(int object_size, Executability executable)
intptr_t MaxExecutableSize()