mirror of
https://github.com/luanti-org/luanti.git
synced 2026-01-13 20:55:30 +01:00
Add support for Tracy profiler (#15113)
This commit is contained in:
@@ -73,6 +73,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "filesys.h"
|
||||
#include "log.h"
|
||||
#include "util/string.h"
|
||||
#include "util/tracy_wrapper.h"
|
||||
#include <vector>
|
||||
#include <cstdarg>
|
||||
#include <cstdio>
|
||||
@@ -960,6 +961,8 @@ void TrackFreedMemory(size_t amount)
|
||||
|
||||
void TriggerMemoryTrim()
|
||||
{
|
||||
ZoneScoped;
|
||||
|
||||
constexpr auto MO = std::memory_order_relaxed;
|
||||
if (memory_freed.load(MO) >= MEMORY_TRIM_THRESHOLD) {
|
||||
// Synchronize call
|
||||
|
||||
Reference in New Issue
Block a user