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

Side by Side Diff: base/allocator/partition_allocator/partition_alloc.cc

Issue 2705413003: Move oom.h into partition_allocator. (Closed)
Patch Set: IWYU: Assertions.h. Created 3 years, 10 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
OLDNEW
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
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
OLDNEW
« no previous file with comments | « base/allocator/partition_allocator/oom.h ('k') | third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698