partition_stats.cc 575 B

123456789101112131415161718192021
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "base/allocator/partition_allocator/partition_stats.h"
  5. #include <cstring>
  6. namespace partition_alloc {
  7. SimplePartitionStatsDumper::SimplePartitionStatsDumper() {
  8. memset(&stats_, 0, sizeof(stats_));
  9. }
  10. void SimplePartitionStatsDumper::PartitionDumpTotals(
  11. const char* partition_name,
  12. const PartitionMemoryStats* memory_stats) {
  13. stats_ = *memory_stats;
  14. }
  15. } // namespace partition_alloc