mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-04 22:49:32 +03:00
fix warning on freebsd
This commit is contained in:
parent
38639a08c8
commit
8cf985ac8f
1 changed files with 2 additions and 2 deletions
4
src/os.c
4
src/os.c
|
@ -311,7 +311,7 @@ static bool mi_os_mem_free(void* addr, size_t size, bool was_committed, mi_stats
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(MI_USE_SBRK) && !defined(__wasi__)
|
#if !(defined(__wasi__) || defined(MI_USE_SBRK) || defined(MAP_ALIGNED))
|
||||||
static void* mi_os_get_aligned_hint(size_t try_alignment, size_t size);
|
static void* mi_os_get_aligned_hint(size_t try_alignment, size_t size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -662,7 +662,7 @@ static void* mi_os_get_aligned_hint(size_t try_alignment, size_t size)
|
||||||
if (hint%try_alignment != 0) return NULL;
|
if (hint%try_alignment != 0) return NULL;
|
||||||
return (void*)hint;
|
return (void*)hint;
|
||||||
}
|
}
|
||||||
#elif defined(__wasi__) || defined(MI_USE_SBRK)
|
#elif defined(__wasi__) || defined(MI_USE_SBRK) || defined(MAP_ALIGNED)
|
||||||
// no need for mi_os_get_aligned_hint
|
// no need for mi_os_get_aligned_hint
|
||||||
#else
|
#else
|
||||||
static void* mi_os_get_aligned_hint(size_t try_alignment, size_t size) {
|
static void* mi_os_get_aligned_hint(size_t try_alignment, size_t size) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue