document MALLOC_JUSTDEFINE and MALLOC_JUSTDEFINE_LIMIT

This commit is contained in:
pooka 2007-03-29 16:29:37 +00:00
parent 9e407afead
commit 3f2dd92fb2
1 changed files with 13 additions and 2 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: malloc.9,v 1.37 2007/02/17 08:50:05 wiz Exp $
.\" $NetBSD: malloc.9,v 1.38 2007/03/29 16:29:37 pooka Exp $
.\"
.\" Copyright (c) 1996, 2003 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -34,7 +34,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd November 7, 2004
.Dd March 29, 2007
.Dt MALLOC 9
.Os
.Sh NAME
@ -73,7 +73,9 @@
.Fn malloc_type_setlimit "struct malloc_type *type" "unsigned long limit"
.In sys/mallocvar.h
.Fn MALLOC_DEFINE_LIMIT "type" "shortdesc" "longdesc" "limit"
.Fn MALLOC_JUSTDEFINE_LIMIT "type" "shortdesc" "longdesc" "limit"
.Fn MALLOC_DEFINE "type" "shortdesc" "longdesc"
.Fn MALLOC_JUSTDEFINE "type" "shortdesc" "longdesc"
.Fn MALLOC_DECLARE "type"
.Sh DESCRIPTION
The
@ -278,6 +280,15 @@ to the kernel memory allocator.
This is intended for use by LKMs; malloc types included in modules
statically-linked into the kernel are automatically registered with
the kernel memory allocator.
However, it is possible to define malloc types without automatically
registering them using
.Fn MALLOC_JUSTDEFINE
or
.Fn MALLOC_JUSTDEFINE_LIMIT .
Apart from not automatically registering to the kernel a boot time,
these functions are equivalent to their counterparts.
They can be used when a separate LKM codepath for initialization is
not desired.
.Pp
The
.Fn malloc_type_detach