diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-11-25 11:46:10 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-11-25 11:46:10 +0100 |
commit | 9537d8e087731fc6d6de22d29b2dccda572d7f06 (patch) | |
tree | 138e08037c8dad2b455a04bd5f972c03ddc2cff2 /include/malloc.h | |
parent | slibc-print does not define NULL (diff) | |
download | slibc-9537d8e087731fc6d6de22d29b2dccda572d7f06.tar.gz slibc-9537d8e087731fc6d6de22d29b2dccda572d7f06.tar.bz2 slibc-9537d8e087731fc6d6de22d29b2dccda572d7f06.tar.xz |
tell in doc in which version things were introduced
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | include/malloc.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/malloc.h b/include/malloc.h index 6410ad0..578a765 100644 --- a/include/malloc.h +++ b/include/malloc.h @@ -51,6 +51,8 @@ * indicate the error. * * @throws ENOMEM The process cannot allocate more memory. + * + * @since Always. */ void* malloc(size_t) __GCC_ONLY(__attribute__((__malloc__, __warn_unused_result__))); @@ -73,6 +75,8 @@ void* malloc(size_t) * `errno` is set to indicate the error. * * @throws ENOMEM The process cannot allocate more memory. + * + * @since Always. */ void* calloc(size_t, size_t) __GCC_ONLY(__attribute__((__malloc__, __warn_unused_result__))); @@ -99,6 +103,8 @@ void* calloc(size_t, size_t) * indicate the error. * * @throws ENOMEM The process cannot allocate more memory. + * + * @since Always. */ void* mallocz(size_t, int) __GCC_ONLY(__attribute__((__malloc__, __warn_unused_result__))); @@ -125,6 +131,8 @@ void* mallocz(size_t, int) * indicate the error. * * @throws ENOMEM The process cannot allocate more memory. + * + * @since Always. */ void* zalloc(size_t) __warning("'zalloc' is klibc extension, use 'calloc(1, n)' instead of 'zalloc(n)'.") @@ -154,6 +162,8 @@ void* zalloc(size_t) * is returned and `errno` is set to indicate the error. * * @throws ENOMEM The process cannot allocate more memory. + * + * @since Always. */ void* realloc(void*, size_t) __GCC_ONLY(__attribute__((__warn_unused_result__))) @@ -168,6 +178,8 @@ void* realloc(void*, size_t) * The process may crash if it does not point to the * beginning of a memory allocation on the heap. * However, if it is `NULL`, nothing will happen. + * + * @since Always. */ void free(void*) __slibc_warning("Use 'fast_free' or 'secure_free' instead."); @@ -183,6 +195,8 @@ void free(void*) * The process may crash if it does not point to the * beginning of a memory allocation on the heap. * However, if it is `NULL`, nothing will happen. + * + * @since Always. */ #if !defined(__PORTABLE) void cfree(void*, ...) @@ -214,6 +228,8 @@ void cfree(void*, ...) * * @throws ENOMEM The process cannot allocate more memory. * @throws EINVAL If `boundary` is not a power of two. + * + * @since Always. */ void* memalign(size_t, size_t) #ifdef __C11__ @@ -240,6 +256,8 @@ void* memalign(size_t, size_t) * * @throws ENOMEM The process cannot allocate more memory. * @throws EINVAL If `boundary` is not a power-of-two multiple of `sizeof(void*)`. + * + * @since Always. */ int posix_memalign(void**, size_t, size_t) __GCC_ONLY(__attribute__((__nonnull__))); @@ -263,6 +281,8 @@ int posix_memalign(void**, size_t, size_t) * indicate the error. * * @throws ENOMEM The process cannot allocate more memory. + * + * @since Always. */ void* valloc(size_t) __GCC_ONLY(__attribute__((__malloc__, __warn_unused_result__))) @@ -285,6 +305,8 @@ void* valloc(size_t) * indicate the error. * * @throws ENOMEM The process cannot allocate more memory. + * + * @since Always. */ void* pvalloc(size_t) __GCC_ONLY(__attribute__((__malloc__, __warn_unused_result__))) @@ -315,6 +337,8 @@ void* pvalloc(size_t) * * @throws ENOMEM The process cannot allocate more memory. * @throws EINVAL If `boundary` is not a power of two. + * + * @since Always. */ void* aligned_alloc(size_t, size_t) __GCC_ONLY(__attribute__((__malloc__, __warn_unused_result__))); @@ -332,6 +356,8 @@ void* aligned_alloc(size_t, size_t) * * @param segment The memory segment. * @return The size of the memory segment, 0 if `segment` is `NULL`. + * + * @since Always. */ size_t malloc_usable_size(void*) __GCC_ONLY(__attribute__((__warn_unused_result__))); |