| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // the valgrind and heapcheck bots, which run without partitions. | 68 // the valgrind and heapcheck bots, which run without partitions. |
| 69 if (s_initialized) { | 69 if (s_initialized) { |
| 70 (void) m_layoutAllocator.shutdown(); | 70 (void) m_layoutAllocator.shutdown(); |
| 71 (void) m_bufferAllocator.shutdown(); | 71 (void) m_bufferAllocator.shutdown(); |
| 72 (void) m_fastMallocAllocator.shutdown(); | 72 (void) m_fastMallocAllocator.shutdown(); |
| 73 } | 73 } |
| 74 } | 74 } |
| 75 | 75 |
| 76 void Partitions::decommitFreeableMemory() | 76 void Partitions::decommitFreeableMemory() |
| 77 { | 77 { |
| 78 RELEASE_ASSERT(isMainThread()); | 78 CHECK(isMainThread()); |
| 79 if (!s_initialized) | 79 if (!s_initialized) |
| 80 return; | 80 return; |
| 81 | 81 |
| 82 partitionPurgeMemoryGeneric(bufferPartition(), PartitionPurgeDecommitEmptyPa
ges); | 82 partitionPurgeMemoryGeneric(bufferPartition(), PartitionPurgeDecommitEmptyPa
ges); |
| 83 partitionPurgeMemoryGeneric(fastMallocPartition(), PartitionPurgeDecommitEmp
tyPages); | 83 partitionPurgeMemoryGeneric(fastMallocPartition(), PartitionPurgeDecommitEmp
tyPages); |
| 84 partitionPurgeMemory(layoutPartition(), PartitionPurgeDecommitEmptyPages); | 84 partitionPurgeMemory(layoutPartition(), PartitionPurgeDecommitEmptyPages); |
| 85 } | 85 } |
| 86 | 86 |
| 87 void Partitions::reportMemoryUsageHistogram() | 87 void Partitions::reportMemoryUsageHistogram() |
| 88 { | 88 { |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 if (totalUsage >= 64 * 1024 * 1024) | 195 if (totalUsage >= 64 * 1024 * 1024) |
| 196 partitionsOutOfMemoryUsing64M(); | 196 partitionsOutOfMemoryUsing64M(); |
| 197 if (totalUsage >= 32 * 1024 * 1024) | 197 if (totalUsage >= 32 * 1024 * 1024) |
| 198 partitionsOutOfMemoryUsing32M(); | 198 partitionsOutOfMemoryUsing32M(); |
| 199 if (totalUsage >= 16 * 1024 * 1024) | 199 if (totalUsage >= 16 * 1024 * 1024) |
| 200 partitionsOutOfMemoryUsing16M(); | 200 partitionsOutOfMemoryUsing16M(); |
| 201 partitionsOutOfMemoryUsingLessThan16M(); | 201 partitionsOutOfMemoryUsingLessThan16M(); |
| 202 } | 202 } |
| 203 | 203 |
| 204 } // namespace WTF | 204 } // namespace WTF |
| OLD | NEW |