mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-04 14:39:31 +03:00
commit
06f8da4218
1 changed files with 1 additions and 1 deletions
2
src/os.c
2
src/os.c
|
@ -269,7 +269,7 @@ void* _mi_os_alloc_aligned(size_t size, size_t alignment, mi_os_tld_t* tld)
|
||||||
// on BSD, use the aligned mmap api
|
// on BSD, use the aligned mmap api
|
||||||
size_t n = _mi_bsr(alignment);
|
size_t n = _mi_bsr(alignment);
|
||||||
if ((size_t)1 << n == alignment && n >= 12) { // alignment is a power of 2 and >= 4096
|
if ((size_t)1 << n == alignment && n >= 12) { // alignment is a power of 2 and >= 4096
|
||||||
p = mi_mmap(suggest, size, MAP_ALIGNED(n)); // use the freeBSD aligned flags
|
p = mi_mmap(suggest, size, MAP_ALIGNED(n), tld->stats); // use the NetBSD/freeBSD aligned flags
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (p==NULL && (tld->mmap_next_probable % alignment) == 0) {
|
if (p==NULL && (tld->mmap_next_probable % alignment) == 0) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue