Revert "[Partition Alloc] Don't redundantly call madvise redundantly."
This reverts commit be7b68a7. Reason for revert: Lost the crucial CHECK(!ret) in a merge conflict, and re-adding it causes macOS to fail (EINVAL, invalid address). That requires further investigation. Original change's description: > [Partition Alloc] Don't redundantly call madvise redundantly. > > When > > #ifndef MADV_FREE > #define MADV_FREE MADV_DONTNEED > #endif > > we would call madvise(..., MADV_FREE); and then, if that failed, call > madvise(..., MADV_DONTNEED). This would result in pointlessly calling > madvise(..., MADV_DONTNEED) and then trying again instead of CHECKing > immediately. > > This is more of a readability refactor than a performance-relevant change, > obviously. > > Thanks to ajwong for noticing this! > > BUG=766882,755284 > > Change-Id: If8cbe14f38dfe2bd126bc24f79e670c45b29c8d5 > Reviewed-on: https://chromium-review.googlesource.com/754038 > Reviewed-by: Primiano Tucci <primiano@chromium.org> > Reviewed-by: Kentaro Hara <haraken@chromium.org> > Commit-Queue: Chris Palmer <palmer@chromium.org> > Cr-Commit-Position: refs/heads/master@{#514635} TBR=ajwong@chromium.org,palmer@chromium.org,primiano@chromium.org,haraken@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 766882, 755284 Change-Id: I2b71c2f6773c38109d17c151e5a81aa50bc46b10 Reviewed-on: https://chromium-review.googlesource.com/759058Reviewed-by:Chris Palmer <palmer@chromium.org> Reviewed-by:
Kentaro Hara <haraken@chromium.org> Reviewed-by:
Albert J. Wong <ajwong@chromium.org> Commit-Queue: Chris Palmer <palmer@chromium.org> Cr-Commit-Position: refs/heads/master@{#515091}
Showing
Please register or sign in to comment