summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/malloc.3
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1997-07-01 18:39:38 +0000
committerphk <phk@FreeBSD.org>1997-07-01 18:39:38 +0000
commita4c209850278391123f7d7565de09fd98e6afcec (patch)
tree2c88b1fb23a14c6fbb18ee2eb5aec8089f975677 /lib/libc/stdlib/malloc.3
parenta10c1a2949114029b4375969b9303841d9a19235 (diff)
downloadFreeBSD-src-a4c209850278391123f7d7565de09fd98e6afcec.zip
FreeBSD-src-a4c209850278391123f7d7565de09fd98e6afcec.tar.gz
malloc_sysv used before initialized, reported in PR4002 by
Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru> Various cleanup from Keith Bostic Reinstate calloc() as a separate funtion, in its own source/object file. leave the manpage integrated with malloc.3 and friends. Too many things were broken in this respect. PR: 4002 Reviewed by: phk Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru> Submitted by: Keith Bostic <bostic@bostic.com>
Diffstat (limited to 'lib/libc/stdlib/malloc.3')
-rw-r--r--lib/libc/stdlib/malloc.320
1 files changed, 15 insertions, 5 deletions
diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3
index a0262c1..ef77e80 100644
--- a/lib/libc/stdlib/malloc.3
+++ b/lib/libc/stdlib/malloc.3
@@ -34,7 +34,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)malloc.3 8.1 (Berkeley) 6/4/93
-.\" $Id: malloc.3,v 1.11 1997/06/12 12:45:45 phk Exp $
+.\" $Id: malloc.3,v 1.12 1997/06/22 17:54:27 phk Exp $
.\"
.Dd August 27, 1996
.Dt MALLOC 3
@@ -119,7 +119,7 @@ is NULL, no action occurs.
.Sh TUNING
Once, when the first call is made to one of these memory allocation
routines, various flags will be set or reset, which affect the
-workings of this alloction implementation.
+workings of this allocation implementation.
.Pp
The ``name'' of the file referenced by the symbolic link named
.Pa /etc/malloc.conf ,
@@ -142,9 +142,16 @@ in these cases.
.It J
Each byte of new memory allocated by
.Fn malloc
-and
+or
+.Fn realloc
+as well as all memory returned by
+.Fn free
+or
.Fn realloc
will be initialized to 0xd0.
+This options also sets the
+.Dq R
+option.
This is intended for debugging and will impact performance negatively.
.It H
Pass a hint to the kernel about pages unused by the allocation functions.
@@ -183,8 +190,11 @@ extern char *malloc_options;
malloc_options = "X";
.Ed
.It Z
-Initialize all allocated memory to nul bytes, and overwrite any
-surrounding memory necessary for alignment reasons with 0xd0 bytes.
+This option implicitly sets the
+.Dq J
+and
+.Dq R
+options, and then zeros out the bytes that were requested.
This is intended for debugging and will impact performance negatively.
.It <
Reduce the size of the cache by a factor of two.
OpenPOWER on IntegriCloud