.hpp -> .h, .hpp now contains cpp defintions. bug fix. never use virtualloc if restricted
This commit is contained in:
parent
06042c079b
commit
fcb90a08c6
@ -4,7 +4,7 @@ This is free software; you can redistribute it and/or modify it under the
|
||||
terms of the MIT license. A copy of the license can be found in the file
|
||||
"LICENSE" at the root of this distribution.
|
||||
-----------------------------------------------------------------------------*/
|
||||
#include "AuroraEnvrionment.hpp"
|
||||
#include "AuroraEnvrionment.h"
|
||||
|
||||
#include "mimalloc.h"
|
||||
#include "mimalloc-internal.h"
|
||||
|
4
src/os.c
4
src/os.c
@ -4,7 +4,7 @@ This is free software; you can redistribute it and/or modify it under the
|
||||
terms of the MIT license. A copy of the license can be found in the file
|
||||
"LICENSE" at the root of this distribution.
|
||||
-----------------------------------------------------------------------------*/
|
||||
#include "AuroraEnvrionment.hpp"
|
||||
#include "AuroraEnvrionment.h"
|
||||
|
||||
#ifndef _DEFAULT_SOURCE
|
||||
#define _DEFAULT_SOURCE // ensure mmap flags are defined
|
||||
@ -560,7 +560,7 @@ static void* mi_os_mem_alloc_aligned(size_t size, size_t alignment, bool commit,
|
||||
if (size >= (SIZE_MAX - alignment)) return NULL; // overflow
|
||||
size_t over_size = size + alignment;
|
||||
|
||||
#if _WIN32
|
||||
#if defined(_WIN32) && !defined(_AURORA_MEM_STRICT)
|
||||
// over-allocate and than re-allocate exactly at an aligned address in there.
|
||||
// this may fail due to threads allocating at the same time so we
|
||||
// retry this at most 3 times before giving up.
|
||||
|
@ -4,7 +4,7 @@ This is free software; you can redistribute it and/or modify it under the
|
||||
terms of the MIT license. A copy of the license can be found in the file
|
||||
"LICENSE" at the root of this distribution.
|
||||
-----------------------------------------------------------------------------*/
|
||||
#include "AuroraEnvrionment.hpp"
|
||||
#include "AuroraEnvrionment.h"
|
||||
|
||||
#include "mimalloc.h"
|
||||
#include "mimalloc-internal.h"
|
||||
|
Loading…
Reference in New Issue
Block a user