summaryrefslogtreecommitdiff
path: root/include/stdlib.h
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2018-11-21 06:57:05 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2018-11-21 06:57:05 +0000
commitce94373d770a9aea0a5dc4a7cf14c167ab60874e (patch)
treeae4b5e7ce0cf043db5627e3ec62002539a1d0ed1 /include/stdlib.h
parent47d4eedcfd2d0e3da3ab4d691658eba0db6108bc (diff)
Introducing malloc_usable_size() was a mistake. While some other
libs have it, it is a function that is considered harmful, so: Delete malloc_usable_size(). It is a function that blurs the line between malloc managed memory and application managed memory and exposes some of the internal workings of malloc. If an application relies on that, it is likely to break using another implementation of malloc. If you want usable size x, just allocate x bytes. ok deraadt@ and other devs
Diffstat (limited to 'include/stdlib.h')
-rw-r--r--include/stdlib.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index b0f3dd14782..7a26ed90e4e 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdlib.h,v 1.74 2018/11/18 16:15:18 otto Exp $ */
+/* $OpenBSD: stdlib.h,v 1.75 2018/11/21 06:57:04 otto Exp $ */
/* $NetBSD: stdlib.h,v 1.25 1995/12/27 21:19:08 jtc Exp $ */
/*-
@@ -112,7 +112,6 @@ long labs(long);
ldiv_t ldiv(long, long);
void *malloc(size_t);
#if __BSD_VISIBLE
-size_t malloc_usable_size(void *);
void freezero(void *, size_t)
__attribute__ ((__bounded__(__buffer__,1,2)));
void *reallocarray(void *, size_t, size_t);