Kinda have this memory alloation strat sorted...

This commit is contained in:
2025-02-05 17:18:16 -05:00
parent a41bd8a5f1
commit 648e15daa6
11 changed files with 240 additions and 117 deletions
+22
View File
@@ -672,3 +672,25 @@ void* mem_set( void* destination, U8 fill_byte, SSIZE byte_count )
# define read_only
# endif
#endif
#ifndef local_persist
#define local_persist static
#endif
#if COMPILER_MSVC
# define thread_static __declspec(thread)
#elif COMPILER_CLANG || COMPILER_GCC
# define thread_static __thread
#endif
#if COMPILER_CPP
// Already Defined
#elif COMPILER_C && __STDC_VERSION__ >= 201112L
# define thread_local _Thread_local
#elif COMPILER_MSVC
# define thread_local __declspec(thread)
#elif COMPILER_CLANG
# define thread_local __thread
#else
# error "No thread local support"
#endif