summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1998-09-14 20:34:34 +0000
committerimp <imp@FreeBSD.org>1998-09-14 20:34:34 +0000
commitd54a12dd1facdb67f08dca42390e26c68888051a (patch)
tree1857b46aace0d2d8859abe8d1853c29cf6b355c0 /include
parentca486eae4a64a2b8938674e5131dd1ef0b364310 (diff)
downloadFreeBSD-src-d54a12dd1facdb67f08dca42390e26c68888051a.zip
FreeBSD-src-d54a12dd1facdb67f08dca42390e26c68888051a.tar.gz
Add reallocf to the library. This function is simliar to realloc, but
when it returns NULL to indicate failure, it will also free the memory that was passed to it, if that was non-null. This does not change the semantics of realloc. A second commit will be done to commit the conversion of those places in the code that can safely use this to avoid memory leaks when confronted with low memory situations. Beaten-to-death-but-finally-approved-in: -current
Diffstat (limited to 'include')
-rw-r--r--include/stdlib.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index 960bf43..a78dafa 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -163,6 +163,7 @@ int radixsort __P((const unsigned char **, int, const unsigned char *,
int sradixsort __P((const unsigned char **, int, const unsigned char *,
unsigned));
long random __P((void));
+void *reallocf __P((void *, size_t));
char *realpath __P((const char *, char resolved_path[]));
char *setstate __P((char *));
void srandom __P((unsigned long));
OpenPOWER on IntegriCloud