Break out platform-specific discardable paging into Lock/UnlockPages.
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:David Reveman <reveman@chromium.org> Reviewed-by:
Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#488027}
Showing
Please register or sign in to comment