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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user