blob: 3f613ce1e1aac993eb480cc193be38202598aa3a [file] [log] [blame]
halcanary0d154ee2014-08-11 11:33:51 -07001/*
2 * Copyright 2014 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef ProcStats_DEFINED
9#define ProcStats_DEFINED
10
Brian Osman68870aa2020-07-08 14:12:43 -040011#include <cstdint>
12
halcanary0d154ee2014-08-11 11:33:51 -070013/**
14 * ProcStats - Process Statistics Functions
15 */
16
17namespace sk_tools {
18
19/**
Brian Osman68870aa2020-07-08 14:12:43 -040020 * If implemented, returns the current resident set size in bytes.
21 * If not, returns -1.
22 */
23int64_t getCurrResidentSetSizeBytes();
24
25/**
26 * If implemented, returns the maximum resident set size in MB.
27 * If not, returns -1.
28 */
29int64_t getMaxResidentSetSizeBytes();
30
31/**
mtklein95553d92015-03-12 08:24:21 -070032 * If implemented, returns the maximum resident set size in MB.
33 * If not, returns -1.
halcanary0d154ee2014-08-11 11:33:51 -070034 */
mtkleinafb43792014-08-19 15:55:55 -070035int getMaxResidentSetSizeMB();
halcanary0d154ee2014-08-11 11:33:51 -070036
mtklein95553d92015-03-12 08:24:21 -070037/**
38 * If implemented, returns the current resident set size in MB.
39 * If not, returns -1.
40 */
41int getCurrResidentSetSizeMB();
42
halcanary0d154ee2014-08-11 11:33:51 -070043} // namespace sk_tools
44
45#endif // ProcStats_DEFINED