mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
merge from dev
This commit is contained in:
commit
3fd47e7541
22 changed files with 293 additions and 68 deletions
|
@ -144,7 +144,7 @@ void _mi_prim_mem_init( mi_os_mem_config_t* config )
|
|||
ULONGLONG memInKiB = 0;
|
||||
if (GetPhysicallyInstalledSystemMemory(&memInKiB)) {
|
||||
if (memInKiB > 0 && memInKiB < (SIZE_MAX / MI_KiB)) {
|
||||
config->physical_memory = (size_t)(memInKiB * MI_KiB);
|
||||
config->physical_memory = (size_t)memInKiB * MI_KiB;
|
||||
}
|
||||
}
|
||||
// get the VirtualAlloc2 function
|
||||
|
@ -652,7 +652,7 @@ static void NTAPI mi_win_main(PVOID module, DWORD reason, LPVOID reserved) {
|
|||
}
|
||||
else if (reason==DLL_THREAD_DETACH && !_mi_is_redirected()) {
|
||||
_mi_thread_done(NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue