mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-05 06:59: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)
|
#elif defined(_WIN32) && !defined(MI_SHARED_LIB)
|
||||||
// use thread local storage keys to detect thread ending
|
// use thread local storage keys to detect thread ending
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include <fibersapi.h>
|
||||||
static DWORD mi_fls_key;
|
static DWORD mi_fls_key;
|
||||||
static void NTAPI mi_fls_done(PVOID value) {
|
static void NTAPI mi_fls_done(PVOID value) {
|
||||||
if (value!=NULL) mi_thread_done();
|
if (value!=NULL) mi_thread_done();
|
||||||
|
@ -388,6 +389,8 @@ static void mi_process_done(void) {
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
__declspec(dllexport) BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) {
|
__declspec(dllexport) BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) {
|
||||||
|
UNUSED(reserved);
|
||||||
|
UNUSED(inst);
|
||||||
if (reason==DLL_PROCESS_ATTACH) {
|
if (reason==DLL_PROCESS_ATTACH) {
|
||||||
mi_process_init();
|
mi_process_init();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue