Even though Korli beat me, I've updated the posix_memalign() function to be more standards

compliant:
* it now checks the alignment is a multiple of 4 (needs to be changed for 64 bit architectures)
* it no longer sets errno.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21975 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2007-08-16 10:04:44 +00:00
parent bf7beb500c
commit dfd5242e7f
2 changed files with 23 additions and 13 deletions
+4 -4
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2006, Haiku Inc. All Rights Reserved.
* Copyright 2002-2007, Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _STDLIB_H_
@@ -45,11 +45,11 @@ extern "C" {
#endif
/* memory allocation (see malloc.h for additional defines & prototypes) */
extern void *calloc(size_t nmemb, size_t size);
extern void *calloc(size_t numElements, size_t size);
extern void free(void *pointer);
extern void *malloc(size_t size);
extern void *realloc(void * ptr, size_t size);
extern int posix_memalign(void **memptr, size_t alignment, size_t size);
extern int posix_memalign(void **_pointer, size_t alignment, size_t size);
extern void *realloc(void *oldPointer, size_t newSize);
/* process termination */
extern void abort(void);