Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Side by Side Diff: third_party/WebKit/Source/wtf/PartitionAllocator.cpp

Issue 1611343002: wtf reformat test Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pydent Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "wtf/PartitionAllocator.h" 31 #include "wtf/PartitionAllocator.h"
32 32
33 #include "wtf/PartitionAlloc.h" 33 #include "wtf/PartitionAlloc.h"
34 #include "wtf/Partitions.h" 34 #include "wtf/Partitions.h"
35 35
36 namespace WTF { 36 namespace WTF {
37 37
38 void* PartitionAllocator::allocateBacking(size_t size, const char* typeName) 38 void* PartitionAllocator::allocateBacking(size_t size, const char* typeName) {
39 { 39 return Partitions::bufferMalloc(size, typeName);
40 return Partitions::bufferMalloc(size, typeName);
41 } 40 }
42 41
43 void PartitionAllocator::freeVectorBacking(void* address) 42 void PartitionAllocator::freeVectorBacking(void* address) {
44 { 43 Partitions::bufferFree(address);
45 Partitions::bufferFree(address);
46 } 44 }
47 45
48 void PartitionAllocator::freeHashTableBacking(void* address) 46 void PartitionAllocator::freeHashTableBacking(void* address) {
49 { 47 Partitions::bufferFree(address);
50 Partitions::bufferFree(address);
51 } 48 }
52 49
53 template <> 50 template <>
54 char* PartitionAllocator::allocateVectorBacking<char>(size_t size) 51 char* PartitionAllocator::allocateVectorBacking<char>(size_t size) {
55 {
56 return reinterpret_cast<char*>(allocateBacking(size, "char")); 52 return reinterpret_cast<char*>(allocateBacking(size, "char"));
57 } 53 }
58 54
59 template <> 55 template <>
60 char* PartitionAllocator::allocateExpandedVectorBacking<char>(size_t size) 56 char* PartitionAllocator::allocateExpandedVectorBacking<char>(size_t size) {
61 {
62 return reinterpret_cast<char*>(allocateBacking(size, "char")); 57 return reinterpret_cast<char*>(allocateBacking(size, "char"));
63 } 58 }
64 59
65 } // namespace WTF 60 } // namespace WTF
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/PartitionAllocator.h ('k') | third_party/WebKit/Source/wtf/Partitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698