aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2015-05-15 20:43:37 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2015-05-15 20:43:37 +0000
commitee90489bc428c6a002afe631f44247a31af787e7 (patch)
tree78736b63f6e1d139a25cf03249341ccbdbdf406c
parent77ac67e29d8db95f0e8b77245390d505897cb5ab (diff)
Notes
-rw-r--r--include/stdlib.h5
-rw-r--r--sys/sys/malloc.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index a5ef0e777749..d5506ff65ea4 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -156,7 +156,8 @@ _Noreturn void _Exit(int);
* If we're in a mode greater than C99, expose C11 functions.
*/
#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
-void * aligned_alloc(size_t, size_t) __malloc_like __alloc_size(2);
+void * aligned_alloc(size_t, size_t) __malloc_like __alloc_align(1)
+ __alloc_size(2);
int at_quick_exit(void (*)(void));
_Noreturn void
quick_exit(int);
@@ -171,7 +172,7 @@ char *realpath(const char * __restrict, char * __restrict);
int rand_r(unsigned *); /* (TSF) */
#endif
#if __POSIX_VISIBLE >= 200112
-int posix_memalign(void **, size_t, size_t) __nonnull(1)
+int posix_memalign(void **, size_t, size_t) __nonnull(1) __alloc_align(2)
__alloc_size(3); /* (ADV) */
int setenv(const char *, const char *, int);
int unsetenv(const char *);
diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h
index 6b8a9c08eaa7..c09d74996bb4 100644
--- a/sys/sys/malloc.h
+++ b/sys/sys/malloc.h
@@ -174,7 +174,7 @@ void contigfree(void *addr, unsigned long size, struct malloc_type *type);
void *contigmalloc(unsigned long size, struct malloc_type *type, int flags,
vm_paddr_t low, vm_paddr_t high, unsigned long alignment,
vm_paddr_t boundary) __malloc_like __result_use_check
- __alloc_size(1);
+ __alloc_size(1) __alloc_align(6);
void free(void *addr, struct malloc_type *type);
void *malloc(unsigned long size, struct malloc_type *type, int flags)
__malloc_like __result_use_check __alloc_size(1);