mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-05 15:09:31 +03:00
fix build for missing malloc_good_size
This commit is contained in:
parent
c47de7eb90
commit
f2e3cca213
1 changed files with 18 additions and 17 deletions
|
@ -219,7 +219,6 @@ extern "C" {
|
||||||
// Forward Posix/Unix calls as well
|
// Forward Posix/Unix calls as well
|
||||||
void* reallocf(void* p, size_t newsize) MI_FORWARD2(mi_reallocf,p,newsize)
|
void* reallocf(void* p, size_t newsize) MI_FORWARD2(mi_reallocf,p,newsize)
|
||||||
size_t malloc_size(const void* p) MI_FORWARD1(mi_usable_size,p)
|
size_t malloc_size(const void* p) MI_FORWARD1(mi_usable_size,p)
|
||||||
size_t malloc_good_size(size_t size) MI_FORWARD1(mi_malloc_good_size,size)
|
|
||||||
#if !defined(__ANDROID__) && !defined(__FreeBSD__)
|
#if !defined(__ANDROID__) && !defined(__FreeBSD__)
|
||||||
size_t malloc_usable_size(void *p) MI_FORWARD1(mi_usable_size,p)
|
size_t malloc_usable_size(void *p) MI_FORWARD1(mi_usable_size,p)
|
||||||
#else
|
#else
|
||||||
|
@ -229,8 +228,10 @@ extern "C" {
|
||||||
// No forwarding here due to aliasing/name mangling issues
|
// No forwarding here due to aliasing/name mangling issues
|
||||||
void* valloc(size_t size) { return mi_valloc(size); }
|
void* valloc(size_t size) { return mi_valloc(size); }
|
||||||
void vfree(void* p) { mi_free(p); }
|
void vfree(void* p) { mi_free(p); }
|
||||||
|
size_t malloc_good_size(size_t size) { return mi_malloc_good_size(size); }
|
||||||
int posix_memalign(void** p, size_t alignment, size_t size) { return mi_posix_memalign(p, alignment, size); }
|
int posix_memalign(void** p, size_t alignment, size_t size) { return mi_posix_memalign(p, alignment, size); }
|
||||||
|
|
||||||
|
|
||||||
// `aligned_alloc` is only available when __USE_ISOC11 is defined.
|
// `aligned_alloc` is only available when __USE_ISOC11 is defined.
|
||||||
// Note: Conda has a custom glibc where `aligned_alloc` is declared `static inline` and we cannot
|
// Note: Conda has a custom glibc where `aligned_alloc` is declared `static inline` and we cannot
|
||||||
// override it, but both _ISOC11_SOURCE and __USE_ISOC11 are undefined in Conda GCC7 or GCC9.
|
// override it, but both _ISOC11_SOURCE and __USE_ISOC11 are undefined in Conda GCC7 or GCC9.
|
||||||
|
|
Loading…
Add table
Reference in a new issue