| Index: base/allocator/partition_allocator/partition_allocator.cc
|
| diff --git a/base/allocator/partition_allocator/partition_allocator.cc b/base/allocator/partition_allocator/partition_allocator.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..164e0be7154ae536539fdcfa967b0312cc2558c4
|
| --- /dev/null
|
| +++ b/base/allocator/partition_allocator/partition_allocator.cc
|
| @@ -0,0 +1,36 @@
|
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "base/allocator/partition_allocator/partition_allocator.h"
|
| +
|
| +#include "base/allocator/partition_allocator/partition_alloc.h"
|
| +#include "base/allocator/partition_allocator/partitions.h"
|
| +
|
| +namespace base {
|
| +
|
| +void* PartitionAllocator::allocateBacking(size_t size, const char* typeName) {
|
| + return Partitions::bufferMalloc(size, typeName);
|
| +}
|
| +
|
| +void PartitionAllocator::freeVectorBacking(void* address) {
|
| + Partitions::bufferFree(address);
|
| +}
|
| +
|
| +void PartitionAllocator::freeHashTableBacking(void* address) {
|
| + Partitions::bufferFree(address);
|
| +}
|
| +
|
| +template <>
|
| +char* PartitionAllocator::allocateVectorBacking<char>(size_t size) {
|
| + return reinterpret_cast<char*>(
|
| + allocateBacking(size, "PartitionAllocator::allocateVectorBacking<char>"));
|
| +}
|
| +
|
| +template <>
|
| +char* PartitionAllocator::allocateExpandedVectorBacking<char>(size_t size) {
|
| + return reinterpret_cast<char*>(allocateBacking(
|
| + size, "PartitionAllocator::allocateExpandedVectorBacking<char>"));
|
| +}
|
| +
|
| +} // namespace base
|
|
|