summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/malloc.3
diff options
context:
space:
mode:
authortholo <tholo@openbsd.org>1997-05-31 08:47:55 +0000
committertholo <tholo@openbsd.org>1997-05-31 08:47:55 +0000
commitaf0d2a954a26d73fc6877361611712238b05579e (patch)
tree9e881fff0d24cf85ff1c352e79c3fbc4bf0eadf1 /lib/libc/stdlib/malloc.3
parentSet errno to EBADF when trying to write to a stream not open for writing; (diff)
downloadwireguard-openbsd-af0d2a954a26d73fc6877361611712238b05579e.tar.xz
wireguard-openbsd-af0d2a954a26d73fc6877361611712238b05579e.zip
Add x/X option to behave like X11 xmalloc; from FreeBSD
Reduce diffs wrt. FreeBSD some
Diffstat (limited to 'lib/libc/stdlib/malloc.3')
-rw-r--r--lib/libc/stdlib/malloc.314
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3
index e206245cc27..f5ab9d70d9b 100644
--- a/lib/libc/stdlib/malloc.3
+++ b/lib/libc/stdlib/malloc.3
@@ -33,7 +33,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: malloc.3,v 1.4 1996/09/26 04:19:41 tholo Exp $
+.\" $OpenBSD: malloc.3,v 1.5 1997/05/31 08:47:55 tholo Exp $
.\"
.Dd August 27, 1996
.Dt MALLOC 3
@@ -160,6 +160,18 @@ This can substantially aid in compacting memory.
``utrace'' generate entries for ktrace(1) for all operations.
Consult the source for this one.
+.It X
+``xmalloc''
+rather than return failure,
+.Xr abort 3
+the program with a diagnostic message on stderr.
+It is the intention that this option be set at compile time by
+including in the source:
+.Bd -literal -offset indent
+extern char *malloc_options;
+malloc_options = "X";
+.Ed
+
.It Z
``zero'' fill some junk into the area allocated (see ``J''),
except for the exact length the user asked for, which is zeroed.