hc
2023-05-26 a23f51ed7a39e452c1037343a84d7db1ca2c5bd7
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
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
 
#ifndef OPENCV_CORE_ALLOCATOR_STATS_HPP
#define OPENCV_CORE_ALLOCATOR_STATS_HPP
 
#include "../cvdef.h"
 
namespace cv { namespace utils {
 
class AllocatorStatisticsInterface
{
protected:
    AllocatorStatisticsInterface() {}
    virtual ~AllocatorStatisticsInterface() {}
public:
    virtual uint64_t getCurrentUsage() const = 0;
    virtual uint64_t getTotalUsage() const = 0;
    virtual uint64_t getNumberOfAllocations() const = 0;
    virtual uint64_t getPeakUsage() const = 0;
 
    /** set peak usage = current usage */
    virtual void resetPeakUsage() = 0;
};
 
}} // namespace
 
#endif // OPENCV_CORE_ALLOCATOR_STATS_HPP