Use atomic operations instead of mutex for memory allocation counter

This commit is contained in:
Andrea Mazzoleni 2026-10-03 17:28:26 +02:00
parent 8589327114
commit 9f24ca00d1
5 changed files with 40 additions and 40 deletions

View file

@ -12,6 +12,11 @@
*/
size_t malloc_counter_get(void);
/**
* Enable or disable single-thread mode for memory counters.
*/
void memory_single_thread(int single_thread);
/**
* Safe malloc.
* If no memory is available, it aborts.