Date: Thu, 22 Mar 2001 21:28:39 +0100 (CET) From: Robert.Drehmel@gizmo.quizbot.org To: FreeBSD-gnats-submit@freebsd.org Subject: docs/26006: Changing zone(9) man page Message-ID: <200103222028.f2MKSdG01430@gizmo.quizbot.org>
index | next in thread | raw e-mail
>Number: 26006
>Category: docs
>Synopsis: Changing zone(9) man page
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-doc
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Mar 22 12:30:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Robert Drehmel
>Release: FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
FreeBSD 5.0-CURRENT
>Description:
I think some information in the manual page for the VM zone allocator
is inaccurate or just unclear expressed.
A structure allocated by the zone allocator does not have to reserve
its two first fields for allocation management pointers. One of
them is used to point to the next available item, but only if it is
available itself; look at the patch for a description of the other
one.
The patch also adds a reference to a chapter in a book.
>How-To-Repeat:
Look at the man page zone(9).
>Fix:
Index: zone.9
===================================================================
RCS file: /home/ncvs/src/share/man/man9/zone.9,v
retrieving revision 1.3
diff -r1.3 zone.9
63,73c63,73
< The zone allocator stores state information inside the items proper,
< so structures that will be managed by the zone allocator must reserve
< two pointers at the very beginning for internal use by the zone
< allocator, as follows:
< .Bd -literal
< struct my_item {
< struct my_item *z_rsvd1;
< struct my_item *z_rsvd2;
< /* rest of structure */
< };
< .Ed
---
> While an item is not in use, the first sizeof(void *) bytes are used
> for a pointer to another available item. When allocated, all of the
> item's space is available, except with
> .Dv INVARIANTS
> defined, where the second sizeof(void *) bytes are used for sanity
> checks, and we would get a panic trying to free the item if those bytes
> were somehow changed to
> .Dv ZENTRY_FREE .
> .Pp
> A similar algorithm is further described in Donald Knuth's `The Art of
> Computer Programming' volume 1, starting at page 254 (section 2.2.3).
191c191,193
< .An Dag-Erling Co\(:idan Sm\(/orgrav Aq des@FreeBSD.org .
---
> .An Dag-Erling Co\(:idan Sm\(/orgrav Aq des@FreeBSD.org
> and modified by
> .An Robert Drehmel .
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103222028.f2MKSdG01430>
