56 template <AllocationType type>
64 template <AllocationRetryMode mode>
70 V8_INLINE bool CanAllocateInReadOnlySpace()
const;
72#ifdef V8_ENABLE_ALLOCATION_TIMEOUT
73 void UpdateAllocationTimeout();
75 void SetAllocationTimeout(
int allocation_timeout);
77 static void SetAllocationGcInterval(
int allocation_gc_interval);
78 static void InitializeOncePerProcess();
80 std::optional<int> get_allocation_timeout_for_testing()
const {
81 return allocation_timeout_;
86 void FreeLinearAllocationAreas();
89 void MakeLinearAllocationAreasIterable();
92 void VerifyLinearAllocationAreas()
const;
97 void MarkLinearAllocationAreasBlack();
98 void UnmarkLinearAllocationsArea();
102 void MarkSharedLinearAllocationAreasBlack();
103 void UnmarkSharedLinearAllocationAreas();
106 void FreeLinearAllocationAreasAndResetFreeLists();
107 void FreeSharedLinearAllocationAreasAndResetFreeLists();
109 void PauseAllocationObservers();
110 void ResumeAllocationObservers();
112 void PublishPendingAllocations();
114 void AddAllocationObserver(AllocationObserver* observer,
115 AllocationObserver* new_space_observer);
116 void RemoveAllocationObserver(AllocationObserver* observer,
117 AllocationObserver* new_space_observer);
121 return &new_space_allocator_.value();
125 return &trusted_space_allocator_.value();
128 return &code_space_allocator_.value();
131 return &shared_space_allocator_.value();
134 template <
typename Function>
155 template <
typename AllocateFunction,
typename RetryFunction>
157 AllocateFunction&& Allocate, RetryFunction&& RetryAllocate,
164 template <
typename AllocateFunction,
typename RetryFunction>
166 AllocateFunction&& Allocate, RetryFunction&& RetryAllocate,
183 void IncrementObjectCounters();
202#ifdef V8_ENABLE_ALLOCATION_TIMEOUT
207 std::optional<int> allocation_timeout_;
212 static std::atomic<int> allocation_gc_interval_;