Skip to content

src: fix AliasedBuffer memory attribution in heap snapshots

src: make util.h self-containted

Before it depended on util-inl.h. Fix it by moving MaybeStackBuffer::AllocateSufficientStorage() into util-inl.h

src: move AliasedBuffer implementation to -inl.h

Drive-by: Replace the SFINAE with a static_assert because we don't have (or need) an implementation for non-scalar AliasedBufferBase otherwise. Add forward declarations to memory_tracker.h now that aliased-buffer.h no longer includes util-inl.h.

src: fix AliasedBuffer memory attribution in heap snapshots

Before the AliasedBuffers were represented solely by the TypedArrays event though they also retain additional memory themselves. Make the accounting more accurate by implementing MemoryRetainer in AliasedBuffer.

Before:

Screenshot 2023-02-24 at 16 06 00

After:

Screenshot 2023-02-24 at 16 05 51

Merge request reports

Loading