| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/allocator/partition_allocator/partition_alloc.h" | 5 #include "base/allocator/partition_allocator/partition_alloc.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include "base/allocator/oom.h" | 9 #include "base/allocator/partition_allocator/oom.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/synchronization/spin_lock.h" | 11 #include "base/synchronization/spin_lock.h" |
| 12 | 12 |
| 13 // Two partition pages are used as guard / metadata page so make sure the super | 13 // Two partition pages are used as guard / metadata page so make sure the super |
| 14 // page size is bigger. | 14 // page size is bigger. |
| 15 static_assert(base::kPartitionPageSize * 4 <= base::kSuperPageSize, | 15 static_assert(base::kPartitionPageSize * 4 <= base::kSuperPageSize, |
| 16 "ok super page size"); | 16 "ok super page size"); |
| 17 static_assert(!(base::kSuperPageSize % base::kPartitionPageSize), | 17 static_assert(!(base::kSuperPageSize % base::kPartitionPageSize), |
| 18 "ok super page multiple"); | 18 "ok super page multiple"); |
| 19 // Four system pages gives us room to hack out a still-guard-paged piece | 19 // Four system pages gives us room to hack out a still-guard-paged piece |
| (...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1406 stats.total_decommittable_bytes += memory_stats[i].decommittable_bytes; | 1406 stats.total_decommittable_bytes += memory_stats[i].decommittable_bytes; |
| 1407 stats.total_discardable_bytes += memory_stats[i].discardable_bytes; | 1407 stats.total_discardable_bytes += memory_stats[i].discardable_bytes; |
| 1408 if (!is_light_dump) | 1408 if (!is_light_dump) |
| 1409 dumper->PartitionsDumpBucketStats(partition_name, &memory_stats[i]); | 1409 dumper->PartitionsDumpBucketStats(partition_name, &memory_stats[i]); |
| 1410 } | 1410 } |
| 1411 } | 1411 } |
| 1412 dumper->PartitionDumpTotals(partition_name, &stats); | 1412 dumper->PartitionDumpTotals(partition_name, &stats); |
| 1413 } | 1413 } |
| 1414 | 1414 |
| 1415 } // namespace base | 1415 } // namespace base |
| OLD | NEW |