summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/malloc.3
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2005-05-24 16:48:35 +0000
committertedu <tedu@openbsd.org>2005-05-24 16:48:35 +0000
commit8f4bd46c4bd5549218b864fca7e2b26884c767d7 (patch)
tree8cbc8148fdbf64eae8c5e23b3a8d2a2580d2dce8 /lib/libc/stdlib/malloc.3
parenthandle sizeof(void *) allocations specially when using malloc guard. (diff)
downloadwireguard-openbsd-8f4bd46c4bd5549218b864fca7e2b26884c767d7.tar.xz
wireguard-openbsd-8f4bd46c4bd5549218b864fca7e2b26884c767d7.zip
add a note describing latest guard feature
Diffstat (limited to 'lib/libc/stdlib/malloc.3')
-rw-r--r--lib/libc/stdlib/malloc.34
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3
index 138ec708e8c..df62e7d3a52 100644
--- a/lib/libc/stdlib/malloc.3
+++ b/lib/libc/stdlib/malloc.3
@@ -30,7 +30,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: malloc.3,v 1.37 2004/07/02 10:42:55 jmc Exp $
+.\" $OpenBSD: malloc.3,v 1.38 2005/05/24 16:48:35 tedu Exp $
.\"
.Dd August 27, 1996
.Dt MALLOC 3
@@ -204,6 +204,8 @@ Enable guard pages and chunk randomization.
Each page size or larger allocation is followed by a guard page that will
cause a segmentation fault upon any access.
Smaller than page size chunks are returned in a random order.
+Pointer sized allocations are aligned to the end of a page to catch
+sizeof(ptr) errors where sizeof(*ptr) is meant.
.Pp
.It Cm H
.Dq Hint .