mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-01-14 08:37:59 +08:00
use rtlgenrandom by default on windows
This commit is contained in:
parent
0be71a2cac
commit
36edfbc70a
@ -167,8 +167,9 @@ If we cannot get good randomness, we fall back to weak randomness based on a tim
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
||||
#if !defined(MI_USE_RTLGENRANDOM)
|
||||
// We prefer BCryptGenRandom over RtlGenRandom
|
||||
#if defined(MI_USE_BCRYPTGENRANDOM)
|
||||
// We would like to use BCryptGenRandom instead of RtlGenRandom but it can lead to a deadlock
|
||||
// under the VS debugger when using dynamic overriding.
|
||||
#pragma comment (lib,"bcrypt.lib")
|
||||
#include <bcrypt.h>
|
||||
static bool os_random_buf(void* buf, size_t buf_len) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user