forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
process_info.h
31 lines (22 loc) · 900 Bytes
/
process_info.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef FLUTTER_FLOW_PROCESS_INFO_H_
#define FLUTTER_FLOW_PROCESS_INFO_H_
#include "lib/fxl/macros.h"
namespace flow {
/// The CompositorContext attempts to collect information from the process for
/// instrumentation purposes. The compositor does not have the platform
/// specific capabilities to collect this information on its own. The platform
/// can choose to provide this information however.
class ProcessInfo {
public:
virtual ~ProcessInfo() = default;
virtual bool SampleNow() = 0;
/// Virtual memory size in bytes.
virtual size_t GetVirtualMemorySize() = 0;
/// Resident memory size in bytes.
virtual size_t GetResidentMemorySize() = 0;
};
} // namespace flow
#endif // FLUTTER_FLOW_PROCESS_INFO_H_