| 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 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1118 ExternalStringTable* external_string_table() { | 1118 ExternalStringTable* external_string_table() { |
| 1119 return &external_string_table_; | 1119 return &external_string_table_; |
| 1120 } | 1120 } |
| 1121 | 1121 |
| 1122 bool concurrent_sweeping_enabled() { return concurrent_sweeping_enabled_; } | 1122 bool concurrent_sweeping_enabled() { return concurrent_sweeping_enabled_; } |
| 1123 | 1123 |
| 1124 inline bool OldGenerationAllocationLimitReached(); | 1124 inline bool OldGenerationAllocationLimitReached(); |
| 1125 | 1125 |
| 1126 void QueueMemoryChunkForFree(MemoryChunk* chunk); | 1126 void QueueMemoryChunkForFree(MemoryChunk* chunk); |
| 1127 void FilterStoreBufferEntriesOnAboutToBeFreedPages(); | 1127 void FilterStoreBufferEntriesOnAboutToBeFreedPages(); |
| 1128 void FreeQueuedChunks(MemoryChunk* list_head); |
| 1128 void FreeQueuedChunks(); | 1129 void FreeQueuedChunks(); |
| 1130 void WaitUntilUnmappingOfFreeChunksCompleted(); |
| 1129 | 1131 |
| 1130 bool RecentIdleNotificationHappened(); | 1132 bool RecentIdleNotificationHappened(); |
| 1131 | 1133 |
| 1132 // Completely clear the Instanceof cache (to stop it keeping objects alive | 1134 // Completely clear the Instanceof cache (to stop it keeping objects alive |
| 1133 // around a GC). | 1135 // around a GC). |
| 1134 inline void CompletelyClearInstanceofCache(); | 1136 inline void CompletelyClearInstanceofCache(); |
| 1135 | 1137 |
| 1136 inline uint32_t HashSeed(); | 1138 inline uint32_t HashSeed(); |
| 1137 | 1139 |
| 1138 inline Smi* NextScriptId(); | 1140 inline Smi* NextScriptId(); |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1649 | 1651 |
| 1650 void Print(); | 1652 void Print(); |
| 1651 void PrintHandles(); | 1653 void PrintHandles(); |
| 1652 | 1654 |
| 1653 // Report heap statistics. | 1655 // Report heap statistics. |
| 1654 void ReportHeapStatistics(const char* title); | 1656 void ReportHeapStatistics(const char* title); |
| 1655 void ReportCodeStatistics(const char* title); | 1657 void ReportCodeStatistics(const char* title); |
| 1656 #endif | 1658 #endif |
| 1657 | 1659 |
| 1658 private: | 1660 private: |
| 1661 class UnmapFreeMemoryTask; |
| 1662 |
| 1659 struct StrongRootsList; | 1663 struct StrongRootsList; |
| 1660 | 1664 |
| 1661 struct StringTypeTable { | 1665 struct StringTypeTable { |
| 1662 InstanceType type; | 1666 InstanceType type; |
| 1663 int size; | 1667 int size; |
| 1664 RootListIndex index; | 1668 RootListIndex index; |
| 1665 }; | 1669 }; |
| 1666 | 1670 |
| 1667 struct ConstantStringTable { | 1671 struct ConstantStringTable { |
| 1668 const char* contents; | 1672 const char* contents; |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2330 | 2334 |
| 2331 // Currently set GC flags that are respected by all GC components. | 2335 // Currently set GC flags that are respected by all GC components. |
| 2332 int current_gc_flags_; | 2336 int current_gc_flags_; |
| 2333 | 2337 |
| 2334 ExternalStringTable external_string_table_; | 2338 ExternalStringTable external_string_table_; |
| 2335 | 2339 |
| 2336 VisitorDispatchTable<ScavengingCallback> scavenging_visitors_table_; | 2340 VisitorDispatchTable<ScavengingCallback> scavenging_visitors_table_; |
| 2337 | 2341 |
| 2338 MemoryChunk* chunks_queued_for_free_; | 2342 MemoryChunk* chunks_queued_for_free_; |
| 2339 | 2343 |
| 2344 base::Semaphore pending_unmap_job_semaphore_; |
| 2345 |
| 2340 base::Mutex relocation_mutex_; | 2346 base::Mutex relocation_mutex_; |
| 2341 | 2347 |
| 2342 int gc_callbacks_depth_; | 2348 int gc_callbacks_depth_; |
| 2343 | 2349 |
| 2344 bool deserialization_complete_; | 2350 bool deserialization_complete_; |
| 2345 | 2351 |
| 2346 bool concurrent_sweeping_enabled_; | 2352 bool concurrent_sweeping_enabled_; |
| 2347 | 2353 |
| 2348 // |live_array_buffers_| maps externally allocated memory used as backing | 2354 // |live_array_buffers_| maps externally allocated memory used as backing |
| 2349 // store for ArrayBuffers to the length of the respective memory blocks. | 2355 // store for ArrayBuffers to the length of the respective memory blocks. |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2746 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2752 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 2747 | 2753 |
| 2748 private: | 2754 private: |
| 2749 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2755 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2750 }; | 2756 }; |
| 2751 #endif // DEBUG | 2757 #endif // DEBUG |
| 2752 } | 2758 } |
| 2753 } // namespace v8::internal | 2759 } // namespace v8::internal |
| 2754 | 2760 |
| 2755 #endif // V8_HEAP_HEAP_H_ | 2761 #endif // V8_HEAP_HEAP_H_ |
| OLD | NEW |