diff options
Diffstat (limited to 'deps/v8/src/heap/spaces.h')
-rw-r--r-- | deps/v8/src/heap/spaces.h | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/deps/v8/src/heap/spaces.h b/deps/v8/src/heap/spaces.h index 48b8c9fc41..7929d53fc9 100644 --- a/deps/v8/src/heap/spaces.h +++ b/deps/v8/src/heap/spaces.h @@ -16,7 +16,6 @@ #include "src/heap/base/active-system-pages.h" #include "src/heap/basic-memory-chunk.h" #include "src/heap/free-list.h" -#include "src/heap/heap.h" #include "src/heap/linear-allocation-area.h" #include "src/heap/list.h" #include "src/heap/memory-chunk-layout.h" @@ -37,9 +36,11 @@ class TestCodePageAllocatorScope; class AllocationObserver; class FreeList; +class Heap; class Isolate; class LargeObjectSpace; class LargePage; +class ObjectIterator; class Page; class PagedSpaceBase; class SemiSpace; @@ -139,9 +140,9 @@ class V8_EXPORT_PRIVATE Space : public BaseSpace { virtual void RemoveAllocationObserver(AllocationObserver* observer); - virtual void PauseAllocationObservers(); + virtual void PauseAllocationObservers() {} - virtual void ResumeAllocationObservers(); + virtual void ResumeAllocationObservers() {} // Returns size of objects. Can differ from the allocated size // (e.g. see OldLargeObjectSpace). @@ -314,7 +315,7 @@ class Page : public MemoryChunk { void AllocateFreeListCategories(); void ReleaseFreeListCategories(); - ActiveSystemPages* active_system_pages() { return &active_system_pages_; } + ActiveSystemPages* active_system_pages() { return active_system_pages_; } template <RememberedSetType remembered_set> void ClearTypedSlotsInFreeMemory(const TypedSlotSet::FreeRangesMap& ranges) { @@ -567,12 +568,7 @@ class SpaceWithLinearArea : public Space { // allow proper observation based on existing observers. min_size specifies // the minimum size that the limited area should have. Address ComputeLimit(Address start, Address end, size_t min_size) const; - V8_EXPORT_PRIVATE virtual void UpdateInlineAllocationLimit( - size_t min_size) = 0; - - void DisableInlineAllocation(); - void EnableInlineAllocation(); - bool IsInlineAllocationEnabled() const { return allocation_info_.enabled(); } + V8_EXPORT_PRIVATE virtual void UpdateInlineAllocationLimit() = 0; void PrintAllocationsOrigins() const; @@ -650,6 +646,19 @@ class SpaceWithLinearArea : public Space { AllocationOrigin::kNumberOfAllocationOrigins)] = {0}; }; +class V8_EXPORT_PRIVATE SpaceIterator : public Malloced { + public: + explicit SpaceIterator(Heap* heap); + virtual ~SpaceIterator(); + + bool HasNext(); + Space* Next(); + + private: + Heap* heap_; + int current_space_; // from enum AllocationSpace. +}; + // Iterates over all memory chunks in the heap (across all spaces). class MemoryChunkIterator { public: |