mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
improve layout of page for x64
This commit is contained in:
parent
2c1da9d194
commit
7b105c4810
4 changed files with 17 additions and 17 deletions
12
src/init.c
12
src/init.c
|
@ -12,7 +12,7 @@ terms of the MIT license. A copy of the license can be found in the file
|
|||
|
||||
// Empty page used to initialize the small free pages array
|
||||
const mi_page_t _mi_page_empty = {
|
||||
0, false, false, false, 0, 0,
|
||||
0, false, false, false, 0, 0,
|
||||
NULL, // free
|
||||
#if MI_SECURE
|
||||
0,
|
||||
|
@ -21,7 +21,7 @@ const mi_page_t _mi_page_empty = {
|
|||
NULL, 0, 0,
|
||||
0, NULL, NULL, NULL
|
||||
#if (MI_INTPTR_SIZE==8 && MI_SECURE==0)
|
||||
, { NULL }
|
||||
// , { NULL }
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -421,7 +421,7 @@ static void mi_process_load(void) {
|
|||
// show message from the redirector (if present)
|
||||
const char* msg = NULL;
|
||||
mi_allocator_init(&msg);
|
||||
if (msg != NULL) _mi_verbose_message(msg);
|
||||
if (msg != NULL) _mi_verbose_message(msg);
|
||||
}
|
||||
|
||||
// Initialize the process; called by thread_init or the process loader
|
||||
|
@ -433,7 +433,7 @@ void mi_process_init(void) mi_attr_noexcept {
|
|||
// when using dynamic linking with interpose.
|
||||
mi_heap_t* h = _mi_heap_default;
|
||||
_mi_process_is_initialized = true;
|
||||
|
||||
|
||||
_mi_heap_main.thread_id = _mi_thread_id();
|
||||
_mi_verbose_message("process init: 0x%zx\n", _mi_heap_main.thread_id);
|
||||
uintptr_t random = _mi_random_init(_mi_heap_main.thread_id) ^ (uintptr_t)h;
|
||||
|
@ -442,7 +442,7 @@ void mi_process_init(void) mi_attr_noexcept {
|
|||
#endif
|
||||
_mi_heap_main.random = _mi_random_shuffle(random);
|
||||
mi_process_setup_auto_thread_done();
|
||||
_mi_os_init();
|
||||
_mi_os_init();
|
||||
#if (MI_DEBUG)
|
||||
_mi_verbose_message("debug level : %d\n", MI_DEBUG);
|
||||
#endif
|
||||
|
@ -480,7 +480,7 @@ static void mi_process_done(void) {
|
|||
__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_load();
|
||||
}
|
||||
else if (reason==DLL_THREAD_DETACH) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue