5#ifndef V8_HEAP_ALLOCATION_OBSERVER_H_
6#define V8_HEAP_ALLOCATION_OBSERVER_H_
9#include <unordered_set>
39 virtual void Step(
int bytes_allocated,
Address soon_object,
size_t size) = 0;
71 size_t aligned_object_size);
81 bool HasAllocationObservers()
const {
AllocationCounter()=default
std::unordered_set< AllocationObserver * > pending_removed_
V8_EXPORT_PRIVATE void AdvanceAllocationObservers(size_t allocated)
V8_EXPORT_PRIVATE void RemoveAllocationObserver(AllocationObserver *observer)
bool IsStepInProgress() const
std::vector< AllocationObserverCounter > pending_added_
std::vector< AllocationObserverCounter > observers_
V8_EXPORT_PRIVATE void AddAllocationObserver(AllocationObserver *observer)
V8_EXPORT_PRIVATE void InvokeAllocationObservers(Address soon_object, size_t object_size, size_t aligned_object_size)
AllocationObserver & operator=(const AllocationObserver &)=delete
static constexpr intptr_t kNotUsingFixedStepSize
virtual void Step(int bytes_allocated, Address soon_object, size_t size)=0
AllocationObserver(const AllocationObserver &)=delete
const intptr_t step_size_
virtual intptr_t GetNextStepSize()
virtual ~AllocationObserver()=default
AllocationObserver(intptr_t step_size)
#define DCHECK_NE(v1, v2)
#define V8_EXPORT_PRIVATE
AllocationObserverCounter(AllocationObserver *observer, size_t prev_counter, size_t next_counter)
AllocationObserver * observer_