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 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 void VisitExternalResources(v8::ExternalResourceVisitor* visitor); | 952 void VisitExternalResources(v8::ExternalResourceVisitor* visitor); |
953 | 953 |
954 // An object should be promoted if the object has survived a | 954 // An object should be promoted if the object has survived a |
955 // scavenge operation. | 955 // scavenge operation. |
956 inline bool ShouldBePromoted(Address old_address, int object_size); | 956 inline bool ShouldBePromoted(Address old_address, int object_size); |
957 | 957 |
958 void ClearNormalizedMapCaches(); | 958 void ClearNormalizedMapCaches(); |
959 | 959 |
960 void IncrementDeferredCount(v8::Isolate::UseCounterFeature feature); | 960 void IncrementDeferredCount(v8::Isolate::UseCounterFeature feature); |
961 | 961 |
962 bool concurrent_sweeping_enabled() { return concurrent_sweeping_enabled_; } | |
963 | |
964 inline bool OldGenerationAllocationLimitReached(); | 962 inline bool OldGenerationAllocationLimitReached(); |
965 | 963 |
966 void QueueMemoryChunkForFree(MemoryChunk* chunk); | 964 void QueueMemoryChunkForFree(MemoryChunk* chunk); |
967 void FilterStoreBufferEntriesOnAboutToBeFreedPages(); | 965 void FilterStoreBufferEntriesOnAboutToBeFreedPages(); |
968 void FreeQueuedChunks(MemoryChunk* list_head); | 966 void FreeQueuedChunks(MemoryChunk* list_head); |
969 void FreeQueuedChunks(); | 967 void FreeQueuedChunks(); |
970 void WaitUntilUnmappingOfFreeChunksCompleted(); | 968 void WaitUntilUnmappingOfFreeChunksCompleted(); |
971 | 969 |
972 // Completely clear the Instanceof cache (to stop it keeping objects alive | 970 // Completely clear the Instanceof cache (to stop it keeping objects alive |
973 // around a GC). | 971 // around a GC). |
(...skipping 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2356 size_t concurrent_unmapping_tasks_active_; | 2354 size_t concurrent_unmapping_tasks_active_; |
2357 | 2355 |
2358 base::Semaphore pending_unmapping_tasks_semaphore_; | 2356 base::Semaphore pending_unmapping_tasks_semaphore_; |
2359 | 2357 |
2360 base::Mutex relocation_mutex_; | 2358 base::Mutex relocation_mutex_; |
2361 | 2359 |
2362 int gc_callbacks_depth_; | 2360 int gc_callbacks_depth_; |
2363 | 2361 |
2364 bool deserialization_complete_; | 2362 bool deserialization_complete_; |
2365 | 2363 |
2366 bool concurrent_sweeping_enabled_; | |
2367 | |
2368 StrongRootsList* strong_roots_list_; | 2364 StrongRootsList* strong_roots_list_; |
2369 | 2365 |
2370 ArrayBufferTracker* array_buffer_tracker_; | 2366 ArrayBufferTracker* array_buffer_tracker_; |
2371 | 2367 |
2372 // Classes in "heap" can be friends. | 2368 // Classes in "heap" can be friends. |
2373 friend class AlwaysAllocateScope; | 2369 friend class AlwaysAllocateScope; |
2374 friend class GCCallbacksScope; | 2370 friend class GCCallbacksScope; |
2375 friend class GCTracer; | 2371 friend class GCTracer; |
2376 friend class HeapIterator; | 2372 friend class HeapIterator; |
2377 friend class IdleScavengeObserver; | 2373 friend class IdleScavengeObserver; |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2741 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2737 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2742 | 2738 |
2743 private: | 2739 private: |
2744 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2740 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2745 }; | 2741 }; |
2746 #endif // DEBUG | 2742 #endif // DEBUG |
2747 } // namespace internal | 2743 } // namespace internal |
2748 } // namespace v8 | 2744 } // namespace v8 |
2749 | 2745 |
2750 #endif // V8_HEAP_HEAP_H_ | 2746 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |