mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-06 07:29:30 +03:00
add test to avoid searching arenas when possible
This commit is contained in:
parent
6279835976
commit
69f935944f
1 changed files with 2 additions and 2 deletions
|
@ -163,8 +163,8 @@ void* _mi_arena_alloc_aligned(size_t size, size_t alignment, bool* commit, bool*
|
||||||
// try to allocate in an arena if the alignment is small enough
|
// try to allocate in an arena if the alignment is small enough
|
||||||
// and the object is not too large or too small.
|
// and the object is not too large or too small.
|
||||||
if (alignment <= MI_SEGMENT_ALIGN &&
|
if (alignment <= MI_SEGMENT_ALIGN &&
|
||||||
// size <= MI_ARENA_MAX_OBJ_SIZE &&
|
size >= MI_ARENA_MIN_OBJ_SIZE &&
|
||||||
size >= MI_ARENA_MIN_OBJ_SIZE)
|
mi_atomic_load_relaxed(&mi_arena_count) > 0)
|
||||||
{
|
{
|
||||||
const size_t bcount = mi_block_count_of_size(size);
|
const size_t bcount = mi_block_count_of_size(size);
|
||||||
const int numa_node = _mi_os_numa_node(tld); // current numa node
|
const int numa_node = _mi_os_numa_node(tld); // current numa node
|
||||||
|
|
Loading…
Add table
Reference in a new issue