summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2001-10-23 06:04:30 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2001-10-23 06:04:30 (GMT)
commitc879222c43f28106db59250965f1e7a26d2cb055 (patch)
treef818210d30c5c0ddeddcc54f1d069023c9e3333c
parentfbb530110cb5127532ed6ff1081f84abf574c43d (diff)
downloadlpsm-c879222c43f28106db59250965f1e7a26d2cb055.zip
lpsm-c879222c43f28106db59250965f1e7a26d2cb055.tar.gz
lpsm-c879222c43f28106db59250965f1e7a26d2cb055.tar.bz2
lpsm-c879222c43f28106db59250965f1e7a26d2cb055.tar.xz
Add section about setting errno to ENOMEM.
-rw-r--r--lpsm_malloc.3.in21
1 files changed, 18 insertions, 3 deletions
diff --git a/lpsm_malloc.3.in b/lpsm_malloc.3.in
index 741866c..52acd65 100644
--- a/lpsm_malloc.3.in
+++ b/lpsm_malloc.3.in
@@ -118,14 +118,29 @@ returns no value.
.PP
.B lpsm_realloc()
returns a pointer to the newly allocated memory, which is suitably
-aligned for any kind of variable and may be different from
+aligned for any kind of variable that can fit into the new allocation size
+and which may be different from
.IR ptr ,
or
.B NULL
-if the request fails or if size was equal to 0. If
+if the request fails or if size was equal to 0 and
+.I ptr
+was not
+.BR NULL .
+If
.B lpsm_realloc()
fails the original block is left untouched - it is not freed or moved.
-.PP
+.SH "ERRORS"
+On error,
+.BR lpsm_malloc() ,
+.BR lpsm_zalloc() ,
+.BR lpsm_calloc()
+or
+.BR lpsm_realloc()
+sets
+.I errno
+to
+.BR ENOMEM .
.SH "CONFORMING TO"
These functions mimic in as much as possible the ISO C and POSIX
behaviour of the equivalent transient memory allocation functions.