summaryrefslogtreecommitdiff
path: root/malloc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-12-23 23:49:48 -0500
committerUlrich Drepper <drepper@gmail.com>2012-01-01 07:17:21 -0500
commit380d7e87dc80978581e73063dff0e264283c0306 (patch)
tree7d7bf0ae5f0ad112100bc49a2e90bcb94f9345ec /malloc
parentc0e87cc01807aee964014bb6518694e7f42b71a7 (diff)
downloadglibc-380d7e87dc80978581e73063dff0e264283c0306.tar.gz
Implement aligned_alloc
Diffstat (limited to 'malloc')
-rw-r--r--malloc/Versions3
-rw-r--r--malloc/malloc.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/malloc/Versions b/malloc/Versions
index cf0b1e559a..7ca9bdf25f 100644
--- a/malloc/Versions
+++ b/malloc/Versions
@@ -58,6 +58,9 @@ libc {
GLIBC_2.10 {
malloc_info;
}
+ GLIBC_2.16 {
+ aligned_alloc;
+ }
GLIBC_PRIVATE {
# Internal startup hook for libpthread.
__libc_malloc_pthread_startup;
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 8608083adb..300e879b8c 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -3124,6 +3124,8 @@ public_mEMALIGn(size_t alignment, size_t bytes)
ar_ptr == arena_for_chunk(mem2chunk(p)));
return p;
}
+/* For ISO C11. */
+weak_alias (public_mEMALIGn, aligned_alloc)
libc_hidden_def (public_mEMALIGn)
void*