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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 PartitionAllocatorGeneric Partitions::m_bufferAllocator; | 44 PartitionAllocatorGeneric Partitions::m_bufferAllocator; |
45 SizeSpecificPartitionAllocator<3328> Partitions::m_nodeAllocator; | 45 SizeSpecificPartitionAllocator<3328> Partitions::m_nodeAllocator; |
46 SizeSpecificPartitionAllocator<1024> Partitions::m_layoutAllocator; | 46 SizeSpecificPartitionAllocator<1024> Partitions::m_layoutAllocator; |
47 HistogramEnumerationFunction Partitions::m_histogramEnumeration = nullptr; | 47 HistogramEnumerationFunction Partitions::m_histogramEnumeration = nullptr; |
48 | 48 |
49 void Partitions::initialize() | 49 void Partitions::initialize() |
50 { | 50 { |
51 spinLockLock(&s_initializationLock); | 51 spinLockLock(&s_initializationLock); |
52 | 52 |
53 if (!s_initialized) { | 53 if (!s_initialized) { |
| 54 partitionAllocGlobalInit(&Partitions::totalSizeOfCommittedPages); |
54 m_fastMallocAllocator.init(); | 55 m_fastMallocAllocator.init(); |
55 m_bufferAllocator.init(); | 56 m_bufferAllocator.init(); |
56 m_nodeAllocator.init(); | 57 m_nodeAllocator.init(); |
57 m_layoutAllocator.init(); | 58 m_layoutAllocator.init(); |
58 s_initialized = true; | 59 s_initialized = true; |
59 } | 60 } |
60 | 61 |
61 spinLockUnlock(&s_initializationLock); | 62 spinLockUnlock(&s_initializationLock); |
62 } | 63 } |
63 | 64 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 // accessed only on the main thread. | 117 // accessed only on the main thread. |
117 ASSERT(isMainThread()); | 118 ASSERT(isMainThread()); |
118 | 119 |
119 partitionDumpStatsGeneric(fastMallocPartition(), "fast_malloc_partition", is
LightDump, partitionStatsDumper); | 120 partitionDumpStatsGeneric(fastMallocPartition(), "fast_malloc_partition", is
LightDump, partitionStatsDumper); |
120 partitionDumpStatsGeneric(bufferPartition(), "buffer_partition", isLightDump
, partitionStatsDumper); | 121 partitionDumpStatsGeneric(bufferPartition(), "buffer_partition", isLightDump
, partitionStatsDumper); |
121 partitionDumpStats(nodePartition(), "node_partition", isLightDump, partition
StatsDumper); | 122 partitionDumpStats(nodePartition(), "node_partition", isLightDump, partition
StatsDumper); |
122 partitionDumpStats(layoutPartition(), "layout_partition", isLightDump, parti
tionStatsDumper); | 123 partitionDumpStats(layoutPartition(), "layout_partition", isLightDump, parti
tionStatsDumper); |
123 } | 124 } |
124 | 125 |
125 } // namespace WTF | 126 } // namespace WTF |
OLD | NEW |