Make PartitionAllocHooks thread-safe Previously PartitionAllocHooks would read/write hooks non-atomically, evne though this data was global and could be accessed across threads. Introduce the use of std::atomic<>s to make loads atomic and specifically use relaxed memory ordering on the allocation/free hot paths for performance. Also introduce synchronization for concurrent calls to SetObserverHooks(). Also fix a missing rename from https://crrev.com/c/1585325: ObserverRealloc -> ReallocObserver. Bug: 957221 Change-Id: I90d44912b730cbad2fd98ad79bbb873587e3c093 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1588946 Reviewed-by: Chris Palmer <palmer@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Commit-Queue: Vlad Tsyrklevich <vtsyrklevich@chromium.org> Cr-Commit-Position: refs/heads/master@{#655129}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .