• Wez's avatar
    Break out platform-specific discardable paging into Lock/UnlockPages. · 42e65bf2
    Wez authored
    Refactor the DiscardableSharedMemory implementation to put platform-
    native discardable page management in separate LockPages/UnlockPages
    functions.
    
    This isolates the platform-specific calls from internal details of the
    DiscardableSharedMemory implementation, in particular the need to allow
    for the space occupied by the SharedState structure.
    
    Also corrects "lock page" platform API errors to return FAILED rather
    than PURGED result, and adds some DCHECKing for "unlock page" API
    errors.
    
    Bug: 716205
    Change-Id: I572d65a0304816305053669ec81c78a3461d8325
    Reviewed-on: https://chromium-review.googlesource.com/574901
    Commit-Queue: Wez <wez@chromium.org>
    Reviewed-by: default avatarDavid Reveman <reveman@chromium.org>
    Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#488027}
    42e65bf2
discardable_shared_memory.cc 14.2 KB