Commit 48439047 authored by Benoit Lize's avatar Benoit Lize Committed by Commit Bot

base/allocator: Fix PartitionAlloc as malloc().

https://chromium-review.googlesource.com/c/chromium/src/+/2235695 didn't
update the "PartitionAlloc everywhere" config. Fix it here.

Bug: 998048
Change-Id: I57c5fe76d4aac50b47967bf9d246f224295e2e40
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2249738Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Benoit L <lizeb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#779295}
parent a1689b9b
......@@ -10,8 +10,8 @@
namespace {
base::PartitionRootGeneric& Allocator() {
static base::NoDestructor<base::PartitionRootGeneric> allocator;
base::ThreadSafePartitionRoot& Allocator() {
static base::NoDestructor<base::ThreadSafePartitionRoot> allocator;
allocator->Init();
return *allocator;
}
......@@ -67,7 +67,7 @@ size_t PartitionGetSizeEstimate(const AllocatorDispatch*,
void* address,
void* context) {
// TODO(lizeb): Returns incorrect values for aligned allocations.
return base::PartitionAllocGetSize(address);
return base::PartitionAllocGetSize<base::internal::ThreadSafe>(address);
}
} // namespace
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment