aboutsummaryrefslogtreecommitdiffstats
path: root/include/malloc.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-07-25 19:24:52 +0200
committerMattias Andrée <maandree@kth.se>2016-07-25 19:24:52 +0200
commit431905e63518af10b353747216bf52e278e54248 (patch)
tree0a55492068876398cb89c98817280e3b029e7914 /include/malloc.h
parenttodo: add procinit (diff)
downloadslibc-431905e63518af10b353747216bf52e278e54248.tar.gz
slibc-431905e63518af10b353747216bf52e278e54248.tar.bz2
slibc-431905e63518af10b353747216bf52e278e54248.tar.xz
allocsize is dangerous
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--include/malloc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/malloc.h b/include/malloc.h
index ab41632..aba1f0a 100644
--- a/include/malloc.h
+++ b/include/malloc.h
@@ -364,7 +364,8 @@ void* aligned_alloc(size_t, size_t)
* @since Always.
*/
size_t malloc_usable_size(void*)
- __GCC_ONLY(__attribute__((__warn_unused_result__)));
+ __GCC_ONLY(__attribute__((__warn_unused_result__)))
+ __warning("This function is dangerous, avoid using it instead of manual bookkeeping.");
#endif
/* TODO add mallopt, M_TRIME_THRESHOLD, M_TOP_PAD, M_MMAP_THRESHOLD, and M_MMAP_MAX */