diff options
author | Daan Leijen <daan@microsoft.com> | 2022-04-08 16:37:08 -0700 |
---|---|---|
committer | Daan Leijen <daan@microsoft.com> | 2022-04-08 16:37:08 -0700 |
commit | 5c7ada4b202a196dcc8c2456bc57a526534f84a5 (patch) | |
tree | 152f6401f9c75c571f35ddd238518e9cd40d1723 /src/init.c | |
parent | 185f296513da2bfcdb413f7c4821bf238c35e035 (diff) | |
parent | 674ee63fa741449d348b277eef6d06c268c6f925 (diff) |
Merge branch 'dev' of https://github.com/microsoft/mimalloc into dev
Diffstat (limited to 'src/init.c')
-rw-r--r-- | src/init.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -25,8 +25,8 @@ const mi_page_t _mi_page_empty = { 0, // used 0, // xblock_size NULL, // local_free - ATOMIC_VAR_INIT(0), // xthread_free - ATOMIC_VAR_INIT(0), // xheap + MI_ATOMIC_VAR_INIT(0), // xthread_free + MI_ATOMIC_VAR_INIT(0), // xheap NULL, NULL }; @@ -91,7 +91,7 @@ mi_decl_cache_align const mi_heap_t _mi_heap_empty = { NULL, MI_SMALL_PAGES_EMPTY, MI_PAGE_QUEUES_EMPTY, - ATOMIC_VAR_INIT(NULL), + MI_ATOMIC_VAR_INIT(NULL), 0, // tid 0, // cookie { 0, 0 }, // keys @@ -123,7 +123,7 @@ mi_heap_t _mi_heap_main = { &tld_main, MI_SMALL_PAGES_EMPTY, MI_PAGE_QUEUES_EMPTY, - ATOMIC_VAR_INIT(NULL), + MI_ATOMIC_VAR_INIT(NULL), 0, // thread id 0, // initial cookie { 0, 0 }, // the key of the main heap can be fixed (unlike page keys that need to be secure!) @@ -381,7 +381,7 @@ bool _mi_is_main_thread(void) { return (_mi_heap_main.thread_id==0 || _mi_heap_main.thread_id == _mi_thread_id()); } -static _Atomic(size_t) thread_count = ATOMIC_VAR_INIT(1); +static _Atomic(size_t) thread_count = MI_ATOMIC_VAR_INIT(1); size_t _mi_current_thread_count(void) { return mi_atomic_load_relaxed(&thread_count); |