Browse Source

decribe 'F' better and mention flags are debugging aids; ok tedu@ jmc@

OPENBSD_4_5
otto 15 years ago
parent
commit
69f875a94f
1 changed files with 10 additions and 8 deletions
  1. +10
    -8
      src/lib/libc/stdlib/malloc.3

+ 10
- 8
src/lib/libc/stdlib/malloc.3 View File

@ -30,9 +30,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" SUCH DAMAGE.
.\" .\"
.\" $OpenBSD: malloc.3,v 1.60 2008/12/30 07:44:51 djm Exp $
.\" $OpenBSD: malloc.3,v 1.61 2009/02/13 18:49:14 otto Exp $
.\" .\"
.Dd $Mdocdate: December 30 2008 $
.Dd $Mdocdate: February 13 2009 $
.Dt MALLOC 3 .Dt MALLOC 3
.Os .Os
.Sh NAME .Sh NAME
@ -233,6 +233,10 @@ order to have any effect.
Enable use after free protection. Enable use after free protection.
Unused pages on the freelist are read and write protected to Unused pages on the freelist are read and write protected to
cause a segmentation fault upon access. cause a segmentation fault upon access.
This will also switch off the delayed freeing of chunks,
reducing random behaviour but detecting double
.Fn free
calls as early as possible.
.It Cm G .It Cm G
.Dq Guard . .Dq Guard .
Enable guard pages. Enable guard pages.
@ -298,12 +302,10 @@ Increase the size of the free page cache by a factor of two.
So to set a systemwide reduction of cache size and use guard pages: So to set a systemwide reduction of cache size and use guard pages:
.Dl # ln -s 'G\*(Lt' /etc/malloc.conf .Dl # ln -s 'G\*(Lt' /etc/malloc.conf
.Pp .Pp
The
.Cm J
and
.Cm Z
flags are mostly for testing and debugging.
If a program changes behavior if either of these options are used,
The flags are mostly for testing and debugging.
If a program changes behavior if any of these options (except
.Cm X )
are used,
it is buggy. it is buggy.
.Pp .Pp
The default number of free pages cached is 64. The default number of free pages cached is 64.


Loading…
Cancel
Save