mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add support for Tracy profiler (#15113)
This commit is contained in:
parent
6f23de41fb
commit
4aec4fbe6f
19 changed files with 379 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue