• Dan Elphick's avatar
    [heap] Start making ReadOnlySpace Pages relocatable · 7485b129
    Dan Elphick authored
    Adds Page::MakeHeaderRelocatable that clears pointers to objects
    outside the space. In this case relocatable means the entire page
    heading is position independent in memory, meaning it could be saved to
    disk and reloaded at a different memory location in a new process
    without there being any invalid pointers.
    
    Currently this only affects mutex_, locate_tracker_ and reservation_.
    
    Additionally makes VerifyHeap work when there's no mutex in a Page.
    
    This is just a stepping stone to making the Pages headers relocatable
    since heap_ and owner_ still point out of the Page.
    
    Also removes the empty ReadOnlySpace destructor.
    
    Bug: v8:7464
    Change-Id: Ife3c06575fa73a5818c4991fb9bec30a5f43901d
    Reviewed-on: https://chromium-review.googlesource.com/1054879Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
    Commit-Queue: Dan Elphick <delphick@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53196}
    7485b129
mutex.h 7.31 KB