Attempt to get SharedSamplerTest.PhysicalMemory passing with libc++.
Currently fails on the libc++ bot with ../../chrome/browser/task_manager/sampling/shared_sampler_win_unittest.cc(144): error: Expected: (physical_bytes()) >= (initial_value + allocated_size), actual: 15224832 vs 19419136 The reason seems to be that memory use is only counted if the memory is referenced, and with libc++ the compiler is apparently able to optimize away the memory's initialization. Add some reading code to make sure the memory references remain. Bug: 801780 Change-Id: I8edef2eda4be8b4344ebc934768ecd58ee39496b Reviewed-on: https://chromium-review.googlesource.com/956571 Commit-Queue: Nico Weber <thakis@chromium.org> Reviewed-by:Hans Wennborg <hans@chromium.org> Cr-Commit-Position: refs/heads/master@{#542225}
Showing
Please register or sign in to comment