Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.15)
project(DNLP_Diff_Engine C)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD 11)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

set(DIFF_ENGINE_VERSION_MAJOR 0)
Expand Down
4 changes: 2 additions & 2 deletions include/utils/tracked_alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
#define TRACKED_BLOCK_SIZE(p) malloc_usable_size(p)
#endif

extern size_t g_allocated_bytes; /* current live bytes */
extern size_t g_peak_bytes; /* high-water mark since last reset */
extern _Thread_local size_t g_allocated_bytes; /* current live bytes */
extern _Thread_local size_t g_peak_bytes; /* high-water mark since last reset */

/* All allocations in src/ must go through these wrappers (and pair sp_free
with sp_malloc / sp_calloc). Tests may use plain malloc/free — those
Expand Down
4 changes: 2 additions & 2 deletions src/utils/tracked_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
*/
#include "utils/tracked_alloc.h"

size_t g_allocated_bytes = 0;
size_t g_peak_bytes = 0;
_Thread_local size_t g_allocated_bytes = 0;
_Thread_local size_t g_peak_bytes = 0;
Loading