mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-04 22:49:32 +03:00
Merge branch 'master' into dev
This commit is contained in:
commit
cbbd57322a
1 changed files with 5 additions and 2 deletions
|
@ -264,6 +264,7 @@ static bool _mi_heap_done() {
|
|||
#elif defined(_WIN32) && !defined(MI_SHARED_LIB)
|
||||
// use thread local storage keys to detect thread ending
|
||||
#include <windows.h>
|
||||
#include <fibersapi.h>
|
||||
static DWORD mi_fls_key;
|
||||
static void NTAPI mi_fls_done(PVOID value) {
|
||||
if (value!=NULL) mi_thread_done();
|
||||
|
@ -388,6 +389,8 @@ static void mi_process_done(void) {
|
|||
#include <windows.h>
|
||||
|
||||
__declspec(dllexport) BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) {
|
||||
UNUSED(reserved);
|
||||
UNUSED(inst);
|
||||
if (reason==DLL_PROCESS_ATTACH) {
|
||||
mi_process_init();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue