diff options
author | Ken Sumrall <ksumrall@android.com> | 2011-12-14 20:50:01 -0800 |
---|---|---|
committer | Ken Sumrall <ksumrall@android.com> | 2011-12-14 20:55:43 -0800 |
commit | 85aad909560508410101c18c6ecc6633df39c596 (patch) | |
tree | 1da341473c2090fa35afc5d22351603bd49ac79c /libc/include/stdlib.h | |
parent | a5cb76bca00b1ce44a04687fb179809c12ea9cd3 (diff) | |
download | android_bionic-85aad909560508410101c18c6ecc6633df39c596.tar.gz android_bionic-85aad909560508410101c18c6ecc6633df39c596.tar.bz2 android_bionic-85aad909560508410101c18c6ecc6633df39c596.zip |
Add the posix_memalign(3) function to bionic
The posix_memalign(3) function is very similar to the traditional
memalign(3) function, but with better error reporting and a guarantee
that the memory it allocates can be freed. In bionic, memalign(3)
allocated memory can be freed, so posix_memalign(3) is just a wrapper
around memalign(3).
Change-Id: I62ee908aa5ba6b887d8446a00d8298d080a6a299
Diffstat (limited to 'libc/include/stdlib.h')
-rw-r--r-- | libc/include/stdlib.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h index 5dc8a87b2..e5caaddac 100644 --- a/libc/include/stdlib.h +++ b/libc/include/stdlib.h @@ -67,6 +67,8 @@ extern unsigned long strtoul(const char *, char **, int); extern unsigned long long strtoull(const char *, char **, int); extern double strtod(const char *nptr, char **endptr); +extern int posix_memalign(void **memptr, size_t alignment, size_t size); + static __inline__ float strtof(const char *nptr, char **endptr) { return (float)strtod(nptr, endptr); |