mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-15 03:29:31 +03:00
fix debug assertion for windows TLS
This commit is contained in:
parent
72f05e2f07
commit
0ae310327f
1 changed files with 5 additions and 5 deletions
|
@ -645,12 +645,12 @@ static void mi_win_tls_init(DWORD reason) {
|
||||||
if (reason==DLL_PROCESS_ATTACH || reason==DLL_THREAD_ATTACH) {
|
if (reason==DLL_PROCESS_ATTACH || reason==DLL_THREAD_ATTACH) {
|
||||||
if (mi_prim_get_default_heap() == NULL) {
|
if (mi_prim_get_default_heap() == NULL) {
|
||||||
_mi_heap_set_default_direct((mi_heap_t*)&_mi_heap_empty);
|
_mi_heap_set_default_direct((mi_heap_t*)&_mi_heap_empty);
|
||||||
}
|
|
||||||
#if MI_DEBUG && MI_WIN_USE_FIXED_TLS==1
|
#if MI_DEBUG && MI_WIN_USE_FIXED_TLS==1
|
||||||
void* const p = TlsGetValue((DWORD)(_mi_win_tls_offset / sizeof(void*)));
|
void* const p = TlsGetValue((DWORD)(_mi_win_tls_offset / sizeof(void*)));
|
||||||
mi_assert_internal(p == (void*)&_mi_heap_empty);
|
mi_assert_internal(p == (void*)&_mi_heap_empty);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
MI_UNUSED(reason);
|
MI_UNUSED(reason);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue