mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-14 19:19: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
|
@ -644,12 +644,12 @@ static void mi_win_tls_init(DWORD reason) {
|
||||||
#endif
|
#endif
|
||||||
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
|
||||||
|
void* const p = TlsGetValue((DWORD)(_mi_win_tls_offset / sizeof(void*)));
|
||||||
|
mi_assert_internal(p == (void*)&_mi_heap_empty);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#if MI_DEBUG && MI_WIN_USE_FIXED_TLS==1
|
|
||||||
void* const p = TlsGetValue((DWORD)(_mi_win_tls_offset / sizeof(void*)));
|
|
||||||
mi_assert_internal(p == (void*)&_mi_heap_empty);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
MI_UNUSED(reason);
|
MI_UNUSED(reason);
|
||||||
|
|
Loading…
Add table
Reference in a new issue