aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-10-16 03:14:09 +0200
committerMattias Andrée <maandree@operamail.com>2015-10-16 03:14:09 +0200
commitb3c7219249599faea3350f76a37a399c58e04667 (patch)
tree344950f35d6596925957b87407a1213cdcf0245b /src
parentinfo. add section for specialised integer types (diff)
downloadslibc-b3c7219249599faea3350f76a37a399c58e04667.tar.gz
slibc-b3c7219249599faea3350f76a37a399c58e04667.tar.bz2
slibc-b3c7219249599faea3350f76a37a399c58e04667.tar.xz
limitations on allocsize
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r--src/slibc-alloc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/slibc-alloc.c b/src/slibc-alloc.c
index ce271b5..743597e 100644
--- a/src/slibc-alloc.c
+++ b/src/slibc-alloc.c
@@ -62,6 +62,11 @@ void secure_free(void* segment)
* This function returns the allocation size of
* a memory segment.
*
+ * Note, this only works for the malloc-family of functions.
+ * It does not work on `alloca`, `strdupa` (or similar
+ * functions), memory maps (that are not created by `malloc`,)
+ * or arrays.
+ *
* `p = malloc(n), allocsize(p)` will return `n`.
*
* @param segment The memory segment.