From 4107f58e89e1963f07b66da353523f87570b65e5 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Wed, 5 Dec 2001 09:49:40 +0000 Subject: document how malloc(0) blobbies are stored, and their character --- lib/libc/stdlib/malloc.3 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/libc/stdlib/malloc.3') diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3 index e5451bb71bc..8f05c38e866 100644 --- a/lib/libc/stdlib/malloc.3 +++ b/lib/libc/stdlib/malloc.3 @@ -34,7 +34,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: malloc.3,v 1.23 2001/11/05 21:31:21 millert Exp $ +.\" $OpenBSD: malloc.3,v 1.24 2001/12/05 09:49:39 deraadt Exp $ .\" .Dd August 27, 1996 .Dt MALLOC 3 @@ -81,6 +81,11 @@ or larger, the memory returned will be page-aligned. Allocation of a zero size object returns a pointer to a zero size object. This zero size object is access protected, so any access to it will generate an exception (SIGSEGV). +Many zero-sized objects can be placed consecutively in shared +protected pages. +The minimum size of the protection on each object is suitably aligned and +sized as previously stated, but the protection may extend further depending +on where in a protected zone the object lands. .Pp The .Fn calloc -- cgit v1.2.3