mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-12-02 00:12:33 +08:00
29 lines
903 B
C++
29 lines
903 B
C++
/*
|
|
* Copyright (c) 2016-present The ZLMediaKit project authors. All Rights Reserved.
|
|
*
|
|
* This file is part of ZLMediaKit(https://github.com/ZLMediaKit/ZLMediaKit).
|
|
*
|
|
* Use of this source code is governed by MIT-like license that can be found in the
|
|
* LICENSE file in the root of the source tree. All contributing project authors
|
|
* may be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#ifndef ZLMEDIAKIT_JEMALLOCUTIL_H
|
|
#define ZLMEDIAKIT_JEMALLOCUTIL_H
|
|
#include <functional>
|
|
#include <string>
|
|
#include <cstdint>
|
|
namespace mediakit {
|
|
class JemallocUtil {
|
|
public:
|
|
static void enable_profiling();
|
|
|
|
static void disable_profiling();
|
|
|
|
static void dump(const std::string &file_name);
|
|
static std::string get_malloc_stats();
|
|
static void some_malloc_stats(const std::function<void(const char *, uint64_t)> &fn);
|
|
};
|
|
} // namespace mediakit
|
|
#endif // ZLMEDIAKIT_JEMALLOCUTIL_H
|