| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |