summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjmc <>2005-06-07 09:04:42 +0000
committerjmc <>2005-06-07 09:04:42 +0000
commit78e3299eb70f83d8118c4baebc1105c99177e1e6 (patch)
tree628654b1ef73d0a63d3b33f5ee7dbbefd1d33fef /src
parent65ac8e1aa6c8de74722ab9326131aca3acef08db (diff)
downloadopenbsd-78e3299eb70f83d8118c4baebc1105c99177e1e6.tar.gz
openbsd-78e3299eb70f83d8118c4baebc1105c99177e1e6.tar.bz2
openbsd-78e3299eb70f83d8118c4baebc1105c99177e1e6.zip
no need to insert spacing between list members;
Diffstat (limited to 'src')
-rw-r--r--src/lib/libc/stdlib/malloc.314
1 files changed, 1 insertions, 13 deletions
diff --git a/src/lib/libc/stdlib/malloc.3 b/src/lib/libc/stdlib/malloc.3
index 2b0f5632a9..8cf547251c 100644
--- a/src/lib/libc/stdlib/malloc.3
+++ b/src/lib/libc/stdlib/malloc.3
@@ -30,7 +30,7 @@
30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31.\" SUCH DAMAGE. 31.\" SUCH DAMAGE.
32.\" 32.\"
33.\" $OpenBSD: malloc.3,v 1.39 2005/06/07 04:42:42 tedu Exp $ 33.\" $OpenBSD: malloc.3,v 1.40 2005/06/07 09:04:42 jmc Exp $
34.\" 34.\"
35.Dd August 27, 1996 35.Dd August 27, 1996
36.Dt MALLOC 3 36.Dt MALLOC 3
@@ -182,7 +182,6 @@ Flags are single letters, uppercase means on, lowercase means off.
182will coredump the process, rather than tolerate failure. 182will coredump the process, rather than tolerate failure.
183This is a very handy debugging aid, since the core file will represent the 183This is a very handy debugging aid, since the core file will represent the
184time of failure, rather than when the null pointer was accessed. 184time of failure, rather than when the null pointer was accessed.
185.Pp
186.It Cm D 185.It Cm D
187.Dq Dump . 186.Dq Dump .
188.Fn malloc 187.Fn malloc
@@ -191,41 +190,34 @@ will dump statistics in a file called
191at exit. 190at exit.
192This option requires the library to have been compiled with -DMALLOC_STATS in 191This option requires the library to have been compiled with -DMALLOC_STATS in
193order to have any effect. 192order to have any effect.
194.Pp
195.It Cm F 193.It Cm F
196.Dq Freeguard . 194.Dq Freeguard .
197Enable use after free protection. 195Enable use after free protection.
198Unused pages on the freelist are read and write protected to 196Unused pages on the freelist are read and write protected to
199cause a segmentation fault upon access. 197cause a segmentation fault upon access.
200.Pp
201.It Cm G 198.It Cm G
202.Dq Guard . 199.Dq Guard .
203Enable guard pages and chunk randomization. 200Enable guard pages and chunk randomization.
204Each page size or larger allocation is followed by a guard page that will 201Each page size or larger allocation is followed by a guard page that will
205cause a segmentation fault upon any access. 202cause a segmentation fault upon any access.
206Smaller than page size chunks are returned in a random order. 203Smaller than page size chunks are returned in a random order.
207.Pp
208.It Cm H 204.It Cm H
209.Dq Hint . 205.Dq Hint .
210Pass a hint to the kernel about pages we don't use. 206Pass a hint to the kernel about pages we don't use.
211If the machine is paging a lot this may help a bit. 207If the machine is paging a lot this may help a bit.
212.Pp
213.It Cm J 208.It Cm J
214.Dq Junk . 209.Dq Junk .
215Fill some junk into the area allocated. 210Fill some junk into the area allocated.
216Currently junk is bytes of 0xd0; this is pronounced 211Currently junk is bytes of 0xd0; this is pronounced
217.Dq Duh . 212.Dq Duh .
218\&:-) 213\&:-)
219.Pp
220.It Cm N 214.It Cm N
221Do not output warning messages when encountering possible corruption 215Do not output warning messages when encountering possible corruption
222or bad pointers. 216or bad pointers.
223.Pp
224.It Cm P 217.It Cm P
225.Dq Pointer Protection . 218.Dq Pointer Protection .
226Pointer sized allocations are aligned to the end of a page to catch 219Pointer sized allocations are aligned to the end of a page to catch
227sizeof(ptr) errors where sizeof(*ptr) is meant. 220sizeof(ptr) errors where sizeof(*ptr) is meant.
228.Pp
229.It Cm R 221.It Cm R
230.Dq realloc . 222.Dq realloc .
231Always reallocate when 223Always reallocate when
@@ -239,7 +231,6 @@ This can substantially aid in compacting memory.
239.\".Xr ktrace 1 231.\".Xr ktrace 1
240.\"for all operations. 232.\"for all operations.
241.\"Consult the source for this one. 233.\"Consult the source for this one.
242.Pp
243.It Cm X 234.It Cm X
244.Dq xmalloc . 235.Dq xmalloc .
245Rather than return failure, 236Rather than return failure,
@@ -251,17 +242,14 @@ including in the source:
251extern char *malloc_options; 242extern char *malloc_options;
252malloc_options = "X"; 243malloc_options = "X";
253.Ed 244.Ed
254.Pp
255.It Cm Z 245.It Cm Z
256.Dq Zero . 246.Dq Zero .
257Fill some junk into the area allocated (see 247Fill some junk into the area allocated (see
258.Cm J ) , 248.Cm J ) ,
259except for the exact length the user asked for, which is zeroed. 249except for the exact length the user asked for, which is zeroed.
260.Pp
261.It Cm < 250.It Cm <
262.Dq Half the cache size . 251.Dq Half the cache size .
263Reduce the size of the cache by a factor of two. 252Reduce the size of the cache by a factor of two.
264.Pp
265.It Cm > 253.It Cm >
266.Dq Double the cache size . 254.Dq Double the cache size .
267Double the size of the cache by a factor of two. 255Double the size of the cache by a factor of two.