Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_HEAP_HEAP_H_ | 5 #ifndef V8_HEAP_HEAP_H_ |
| 6 #define V8_HEAP_HEAP_H_ | 6 #define V8_HEAP_HEAP_H_ |
| 7 | 7 |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1435 | 1435 |
| 1436 inline Isolate* isolate(); | 1436 inline Isolate* isolate(); |
| 1437 | 1437 |
| 1438 void CallGCPrologueCallbacks(GCType gc_type, GCCallbackFlags flags); | 1438 void CallGCPrologueCallbacks(GCType gc_type, GCCallbackFlags flags); |
| 1439 void CallGCEpilogueCallbacks(GCType gc_type, GCCallbackFlags flags); | 1439 void CallGCEpilogueCallbacks(GCType gc_type, GCCallbackFlags flags); |
| 1440 | 1440 |
| 1441 inline bool OldGenerationAllocationLimitReached(); | 1441 inline bool OldGenerationAllocationLimitReached(); |
| 1442 | 1442 |
| 1443 void QueueMemoryChunkForFree(MemoryChunk* chunk); | 1443 void QueueMemoryChunkForFree(MemoryChunk* chunk); |
| 1444 void FilterStoreBufferEntriesOnAboutToBeFreedPages(); | 1444 void FilterStoreBufferEntriesOnAboutToBeFreedPages(); |
| 1445 void FreeQueuedChunks(MemoryChunk* list_head); | |
| 1445 void FreeQueuedChunks(); | 1446 void FreeQueuedChunks(); |
| 1447 void WaitUntilUnmappingOfFreeChunksCompleted(); | |
| 1446 | 1448 |
| 1447 int gc_count() const { return gc_count_; } | 1449 int gc_count() const { return gc_count_; } |
| 1448 | 1450 |
| 1449 bool RecentIdleNotificationHappened(); | 1451 bool RecentIdleNotificationHappened(); |
| 1450 | 1452 |
| 1451 // Completely clear the Instanceof cache (to stop it keeping objects alive | 1453 // Completely clear the Instanceof cache (to stop it keeping objects alive |
| 1452 // around a GC). | 1454 // around a GC). |
| 1453 inline void CompletelyClearInstanceofCache(); | 1455 inline void CompletelyClearInstanceofCache(); |
| 1454 | 1456 |
| 1455 // The roots that have an index less than this are always in old space. | 1457 // The roots that have an index less than this are always in old space. |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1674 MUST_USE_RESULT AllocationResult | 1676 MUST_USE_RESULT AllocationResult |
| 1675 AllocateFixedArray(int length, PretenureFlag pretenure = NOT_TENURED); | 1677 AllocateFixedArray(int length, PretenureFlag pretenure = NOT_TENURED); |
| 1676 | 1678 |
| 1677 static const int kInitialStringTableSize = 2048; | 1679 static const int kInitialStringTableSize = 2048; |
| 1678 static const int kInitialEvalCacheSize = 64; | 1680 static const int kInitialEvalCacheSize = 64; |
| 1679 static const int kInitialNumberStringCacheSize = 256; | 1681 static const int kInitialNumberStringCacheSize = 256; |
| 1680 | 1682 |
| 1681 private: | 1683 private: |
| 1682 Heap(); | 1684 Heap(); |
| 1683 | 1685 |
| 1686 class UnmapFreeMemoryTask; | |
|
Michael Lippautz
2015/08/21 12:28:58
Move to the top of the private section.
Hannes Payer (out of office)
2015/08/21 12:56:04
Done.
| |
| 1687 | |
| 1684 int current_gc_flags() { return current_gc_flags_; } | 1688 int current_gc_flags() { return current_gc_flags_; } |
| 1685 void set_current_gc_flags(int flags) { | 1689 void set_current_gc_flags(int flags) { |
| 1686 current_gc_flags_ = flags; | 1690 current_gc_flags_ = flags; |
| 1687 DCHECK(!ShouldFinalizeIncrementalMarking() || | 1691 DCHECK(!ShouldFinalizeIncrementalMarking() || |
| 1688 !ShouldAbortIncrementalMarking()); | 1692 !ShouldAbortIncrementalMarking()); |
| 1689 } | 1693 } |
| 1690 | 1694 |
| 1691 inline bool ShouldReduceMemory() const { | 1695 inline bool ShouldReduceMemory() const { |
| 1692 return current_gc_flags_ & kReduceMemoryFootprintMask; | 1696 return current_gc_flags_ & kReduceMemoryFootprintMask; |
| 1693 } | 1697 } |
| (...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2292 | 2296 |
| 2293 // Currently set GC flags that are respected by all GC components. | 2297 // Currently set GC flags that are respected by all GC components. |
| 2294 int current_gc_flags_; | 2298 int current_gc_flags_; |
| 2295 | 2299 |
| 2296 ExternalStringTable external_string_table_; | 2300 ExternalStringTable external_string_table_; |
| 2297 | 2301 |
| 2298 VisitorDispatchTable<ScavengingCallback> scavenging_visitors_table_; | 2302 VisitorDispatchTable<ScavengingCallback> scavenging_visitors_table_; |
| 2299 | 2303 |
| 2300 MemoryChunk* chunks_queued_for_free_; | 2304 MemoryChunk* chunks_queued_for_free_; |
| 2301 | 2305 |
| 2306 base::Semaphore pending_unmap_job_semaphore_; | |
| 2307 | |
| 2302 base::Mutex relocation_mutex_; | 2308 base::Mutex relocation_mutex_; |
| 2303 | 2309 |
| 2304 int gc_callbacks_depth_; | 2310 int gc_callbacks_depth_; |
| 2305 | 2311 |
| 2306 bool deserialization_complete_; | 2312 bool deserialization_complete_; |
| 2307 | 2313 |
| 2308 bool concurrent_sweeping_enabled_; | 2314 bool concurrent_sweeping_enabled_; |
| 2309 | 2315 |
| 2310 // |live_array_buffers_| maps externally allocated memory used as backing | 2316 // |live_array_buffers_| maps externally allocated memory used as backing |
| 2311 // store for ArrayBuffers to the length of the respective memory blocks. | 2317 // store for ArrayBuffers to the length of the respective memory blocks. |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2733 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2739 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 2734 | 2740 |
| 2735 private: | 2741 private: |
| 2736 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2742 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2737 }; | 2743 }; |
| 2738 #endif // DEBUG | 2744 #endif // DEBUG |
| 2739 } | 2745 } |
| 2740 } // namespace v8::internal | 2746 } // namespace v8::internal |
| 2741 | 2747 |
| 2742 #endif // V8_HEAP_HEAP_H_ | 2748 #endif // V8_HEAP_HEAP_H_ |
| OLD | NEW |