• Peter Marshall's avatar
    [gc] Attach page to LocalArrayBufferTracker rather than space · 11926e6e
    Peter Marshall authored
    Each local ABT is logically for one page. We passed the space in to the
    constructor, but this is wrong because the space a page is in can
    change, e.g. for compaction pages.
    
    Instead, pass the page to the local ABT constructor and always get the
    space from this. To do this we need to push the AllocateLocalTracker()
    helper and friends down to Page, rather than its superclass MemoryChunk.
    
    Unfortunately, we need to keep ReleaseLocalTracker() on MemoryChunk even
    though only Pages can have local trackers, because we can't do virtual
    dispatch on MemoryChunk::ReleaseAllocatedMemory() which would allow us
    to clean up the tracker memory nicely for pages only.
    
    We also have to make sure we update external bytes accounting properly
    when swapping spaces, as in SemiSpace::Swap().
    
    Change-Id: Iff02e41dd12a6b04a57fcc32f9e2b4f049fcbc24
    Reviewed-on: https://chromium-review.googlesource.com/1107635
    Commit-Queue: Peter Marshall <petermarshall@chromium.org>
    Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53930}
    11926e6e
array-buffer-tracker.cc 4.99 KB