mirror of
https://github.com/gperftools/gperftools
synced 2025-01-03 05:02:04 +00:00
implement support for C11 aligned_alloc
Just like glibc does, we simply alias it to memalign.
This commit is contained in:
parent
92a27e41a1
commit
d406f22853
@ -97,6 +97,7 @@ endif OSX
|
||||
if HAVE_OBJCOPY_WEAKEN
|
||||
WEAKEN = $(OBJCOPY) -W malloc -W free -W realloc -W calloc -W cfree \
|
||||
-W memalign -W posix_memalign -W valloc -W pvalloc \
|
||||
-W aligned_alloc \
|
||||
-W malloc_stats -W mallopt -W mallinfo -W nallocx \
|
||||
-W _Znwm -W _ZnwmRKSt9nothrow_t -W _Znam -W _ZnamRKSt9nothrow_t \
|
||||
-W _ZdlPv -W _ZdaPv \
|
||||
|
@ -143,6 +143,7 @@ extern "C" {
|
||||
void* calloc(size_t n, size_t size) __THROW ALIAS(tc_calloc);
|
||||
void cfree(void* ptr) __THROW ALIAS(tc_cfree);
|
||||
void* memalign(size_t align, size_t s) __THROW ALIAS(tc_memalign);
|
||||
void* aligned_alloc(size_t align, size_t s) __THROW ALIAS(tc_memalign);
|
||||
void* valloc(size_t size) __THROW ALIAS(tc_valloc);
|
||||
void* pvalloc(size_t size) __THROW ALIAS(tc_pvalloc);
|
||||
int posix_memalign(void** r, size_t a, size_t s) __THROW
|
||||
|
@ -71,6 +71,7 @@ extern "C" {
|
||||
void* calloc(size_t n, size_t s) { return tc_calloc(n, s); }
|
||||
void cfree(void* p) { tc_cfree(p); }
|
||||
void* memalign(size_t a, size_t s) { return tc_memalign(a, s); }
|
||||
void* aligned_alloc(size_t a, size_t s) { return tc_memalign(a, s); }
|
||||
void* valloc(size_t s) { return tc_valloc(s); }
|
||||
void* pvalloc(size_t s) { return tc_pvalloc(s); }
|
||||
int posix_memalign(void** r, size_t a, size_t s) {
|
||||
|
Loading…
Reference in New Issue
Block a user