mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-03 22:19:32 +03:00
Compare commits
3 commits
63ea420bd1
...
648d7715f0
Author | SHA1 | Date | |
---|---|---|---|
![]() |
648d7715f0 | ||
![]() |
951538d469 | ||
![]() |
1cede1c9ee |
2 changed files with 4 additions and 0 deletions
|
@ -207,6 +207,7 @@ static void mi_heap_main_init(void) {
|
|||
if (_mi_heap_main.cookie == 0) {
|
||||
_mi_heap_main.thread_id = _mi_thread_id();
|
||||
_mi_heap_main.cookie = 1;
|
||||
mi_thread_init();
|
||||
#if defined(_WIN32) && !defined(MI_SHARED_LIB)
|
||||
_mi_random_init_weak(&_mi_heap_main.random); // prevent allocation failure during bcrypt dll initialization with static linking
|
||||
#else
|
||||
|
|
|
@ -32,6 +32,9 @@ terms of the MIT license. A copy of the license can be found in the file
|
|||
#if defined(__linux__)
|
||||
#include <features.h>
|
||||
#include <sys/prctl.h> // THP disable, PR_SET_VMA
|
||||
#if !defined(PR_SET_VMA)
|
||||
#include <linux/prctl.h>
|
||||
#endif
|
||||
#if defined(__GLIBC__)
|
||||
#include <linux/mman.h> // linux mmap flags
|
||||
#else
|
||||
|
|
Loading…
Add table
Reference in a new issue