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

Side by Side Diff: third_party/WebKit/Source/wtf/Partitions.h

Issue 1415363002: Refactoring: Remove Partitions::bufferRealloc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 static void reportMemoryUsageHistogram(); 89 static void reportMemoryUsageHistogram();
90 90
91 static void dumpMemoryStats(bool isLightDump, PartitionStatsDumper*); 91 static void dumpMemoryStats(bool isLightDump, PartitionStatsDumper*);
92 92
93 ALWAYS_INLINE static void* bufferMalloc(size_t n) 93 ALWAYS_INLINE static void* bufferMalloc(size_t n)
94 { 94 {
95 return partitionAllocGeneric(bufferPartition(), n); 95 return partitionAllocGeneric(bufferPartition(), n);
96 } 96 }
97 97
98 ALWAYS_INLINE static void* bufferRealloc(void* p, size_t n)
99 {
100 return partitionReallocGeneric(bufferPartition(), p, n);
101 }
102
103 ALWAYS_INLINE static void bufferFree(void* p) 98 ALWAYS_INLINE static void bufferFree(void* p)
104 { 99 {
105 partitionFreeGeneric(bufferPartition(), p); 100 partitionFreeGeneric(bufferPartition(), p);
106 } 101 }
107 102
108 ALWAYS_INLINE static size_t bufferActualSize(size_t n) 103 ALWAYS_INLINE static size_t bufferActualSize(size_t n)
109 { 104 {
110 return partitionAllocActualSize(bufferPartition(), n); 105 return partitionAllocActualSize(bufferPartition(), n);
111 } 106 }
112 107
(...skipping 20 matching lines...) Expand all
133 static PartitionAllocatorGeneric m_fastMallocAllocator; 128 static PartitionAllocatorGeneric m_fastMallocAllocator;
134 static PartitionAllocatorGeneric m_bufferAllocator; 129 static PartitionAllocatorGeneric m_bufferAllocator;
135 static SizeSpecificPartitionAllocator<3328> m_nodeAllocator; 130 static SizeSpecificPartitionAllocator<3328> m_nodeAllocator;
136 static SizeSpecificPartitionAllocator<1024> m_layoutAllocator; 131 static SizeSpecificPartitionAllocator<1024> m_layoutAllocator;
137 static HistogramEnumerationFunction m_histogramEnumeration; 132 static HistogramEnumerationFunction m_histogramEnumeration;
138 }; 133 };
139 134
140 } // namespace WTF 135 } // namespace WTF
141 136
142 #endif // Partitions_h 137 #endif // Partitions_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698