Various minor improvements.

This commit is contained in:
wiz 2006-10-26 11:16:28 +00:00
parent 09e63f3f79
commit 1751d830e6
5 changed files with 26 additions and 27 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: vmem.9,v 1.2 2006/10/23 21:21:49 peter Exp $
.\" $NetBSD: vmem.9,v 1.3 2006/10/26 11:16:28 wiz Exp $
.\"
.\" Copyright (c)2006 YAMAMOTO Takashi,
.\" All rights reserved.
@ -37,7 +37,7 @@
The
.Nm
is a general purpose resource allocator.
Despite of its name, it can be used for arbitrary resources
Despite its name, it can be used for arbitrary resources
other than virtual memory.
.\" ------------------------------------------------------------
.Sh CODE REFERENCES
@ -45,8 +45,7 @@ This section describes places within the
.Nx
source tree where actual code implementing the
.Nm
subsystem
can be found.
subsystem can be found.
All pathnames are relative to
.Pa /usr/src .
.Pp

View File

@ -1,4 +1,4 @@
.\" $NetBSD: vmem_alloc.9,v 1.1 2006/10/22 11:14:52 yamt Exp $
.\" $NetBSD: vmem_alloc.9,v 1.2 2006/10/26 11:16:28 wiz Exp $
.\"
.\" Copyright (c)2006 YAMAMOTO Takashi,
.\" All rights reserved.
@ -42,39 +42,39 @@
.\" ------------------------------------------------------------
.Sh DESCRIPTION
.Fn vmem_alloc
allocates resource from the arena.
allocates a resource from the arena.
.Pp
.Bl -tag -width flags
.It Fa vm
The arena which we allocate from.
.It Fa size
Specify the size of allocation.
Specify the size of the allocation.
.It Fa flags
A bitwise OR of an allocation strategy and a sleep flag.
.Pp
The allocation strategy is one of:
.Bl -tag -width VM_INSTANTFIT
.It VM_BESTFIT
.It Dv VM_BESTFIT
Prefer space efficiency.
.It VM_INSTANTFIT
.It Dv VM_INSTANTFIT
Prefer performance.
.El
.Pp
The sleep flag should be one of:
.Bl -tag -width VM_NOSLEEP
.It VM_SLEEP
Can sleep until enough resource is available.
.It VM_NOSLEEP
.It Dv VM_SLEEP
Can sleep until enough resources are available.
.It Dv VM_NOSLEEP
Don't sleep.
Immediately return
.Dv VMEM_ADDR_NULL
if there is not enough resource available.
if there are not enough resources available.
.El
.El
.\" ------------------------------------------------------------
.Sh RETURN VALUES
.Fn vmem_alloc
return an allocated vmem_addr_t.
returns an allocated vmem_addr_t.
Otherwise, it returns
.Dv VMEM_ADDR_NULL .
.\" ------------------------------------------------------------

View File

@ -1,4 +1,4 @@
.\" $NetBSD: vmem_create.9,v 1.1 2006/10/22 11:14:52 yamt Exp $
.\" $NetBSD: vmem_create.9,v 1.2 2006/10/26 11:16:28 wiz Exp $
.\"
.\" Copyright (c)2006 YAMAMOTO Takashi,
.\" All rights reserved.
@ -31,7 +31,7 @@
.\" ------------------------------------------------------------
.Sh NAME
.Nm vmem_create
.Nd Create a vmem arena
.Nd create a vmem arena
.\" ------------------------------------------------------------
.Sh SYNOPSIS
.In sys/vmem.h
@ -51,12 +51,12 @@ creates a new vmem arena.
.It Fa name
The string to describe the vmem.
.It Fa base
The start address of initial span.
The start address of the initial span.
It can be
.Dv VMEM_ADDR_NULL
if no initial span is required.
.It Fa size
The size of initial span.
The size of the initial span.
.It Fa quantum
The smallest unit of allocation.
.It Fa allocfn
@ -67,17 +67,17 @@ The callback function used to free spans to the backend arena.
The backend arena.
.It Fa qcache_max
The largest size of allocations which can be served by quantum cache.
It's merely a hint and can be ignored.
It is merely a hint and can be ignored.
.It Fa flags
Either of:
.Bl -tag -width VM_NOSLEEP
.It VM_SLEEP
Can sleep until enough resource is available.
.It VM_NOSLEEP
.It Dv VM_SLEEP
Can sleep until enough resources are available.
.It VDv M_NOSLEEP
Don't sleep.
Immediately return
.Dv NULL
if there is not enough resource available.
if there are not enough resources available.
.El
.El
.\" ------------------------------------------------------------

View File

@ -1,4 +1,4 @@
.\" $NetBSD: vmem_destroy.9,v 1.2 2006/10/22 11:23:32 yamt Exp $
.\" $NetBSD: vmem_destroy.9,v 1.3 2006/10/26 11:16:28 wiz Exp $
.\"
.\" Copyright (c)2006 YAMAMOTO Takashi,
.\" All rights reserved.
@ -31,7 +31,7 @@
.\" ------------------------------------------------------------
.Sh NAME
.Nm vmem_create
.Nd Destroy a vmem arena
.Nd destroy a vmem arena
.\" ------------------------------------------------------------
.Sh SYNOPSIS
.In sys/vmem.h

View File

@ -1,4 +1,4 @@
.\" $NetBSD: vmem_free.9,v 1.1 2006/10/22 11:14:52 yamt Exp $
.\" $NetBSD: vmem_free.9,v 1.2 2006/10/26 11:16:28 wiz Exp $
.\"
.\" Copyright (c)2006 YAMAMOTO Takashi,
.\" All rights reserved.
@ -31,7 +31,7 @@
.\" ------------------------------------------------------------
.Sh NAME
.Nm vmem_free
.Nd Free resource to arena
.Nd free resource to arena
.\" ------------------------------------------------------------
.Sh SYNOPSIS
.In sys/vmem.h