• Chris Palmer's avatar
    Revert "[Partition Alloc] Don't redundantly call madvise redundantly." · 85ec7854
    Chris Palmer authored
    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: 's avatarChris Palmer <palmer@chromium.org>
    Reviewed-by: 's avatarKentaro Hara <haraken@chromium.org>
    Reviewed-by: 's avatarAlbert J. Wong <ajwong@chromium.org>
    Commit-Queue: Chris Palmer <palmer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#515091}
    85ec7854
Name
Last commit
Last update
..
partition_allocator Loading commit data...
BUILD.gn Loading commit data...
OWNERS Loading commit data...
README.md Loading commit data...
allocator_check.cc Loading commit data...
allocator_check.h Loading commit data...
allocator_extension.cc Loading commit data...
allocator_extension.h Loading commit data...
allocator_interception_mac.h Loading commit data...
allocator_interception_mac.mm Loading commit data...
allocator_interception_mac_unittest.mm Loading commit data...
allocator_shim.cc Loading commit data...
allocator_shim.h Loading commit data...
allocator_shim_default_dispatch_to_glibc.cc Loading commit data...
allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc Loading commit data...
allocator_shim_default_dispatch_to_mac_zoned_malloc.cc Loading commit data...
allocator_shim_default_dispatch_to_mac_zoned_malloc.h Loading commit data...
allocator_shim_default_dispatch_to_tcmalloc.cc Loading commit data...
allocator_shim_default_dispatch_to_winheap.cc Loading commit data...
allocator_shim_internals.h Loading commit data...
allocator_shim_override_cpp_symbols.h Loading commit data...
allocator_shim_override_glibc_weak_symbols.h Loading commit data...
allocator_shim_override_libc_symbols.h Loading commit data...
allocator_shim_override_linker_wrapped_symbols.h Loading commit data...
allocator_shim_override_mac_symbols.h Loading commit data...
allocator_shim_override_ucrt_symbols_win.h Loading commit data...
allocator_shim_unittest.cc Loading commit data...
debugallocation_shim.cc Loading commit data...
malloc_zone_functions_mac.cc Loading commit data...
malloc_zone_functions_mac.h Loading commit data...
malloc_zone_functions_mac_unittest.cc Loading commit data...
tcmalloc_unittest.cc Loading commit data...
unittest_utils.cc Loading commit data...
winheap_stubs_win.cc Loading commit data...
winheap_stubs_win.h Loading commit data...