NetBSD/share/man/man9/vmem_free.9

70 lines
2.5 KiB
Groff

.\" $NetBSD: vmem_free.9,v 1.3 2006/11/04 13:07:58 yamt Exp $
.\"
.\" Copyright (c)2006 YAMAMOTO Takashi,
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" ------------------------------------------------------------
.Dd October 22, 2006
.Dt VMEM_FREE 9
.Os
.\" ------------------------------------------------------------
.Sh NAME
.Nm vmem_free
.Nd free resource to arena
.\" ------------------------------------------------------------
.Sh SYNOPSIS
.In sys/vmem.h
.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
.Ft void
.Fn vmem_free \
"vmem_t *vm" "vmem_addr_t addr" "vmem_size_t size"
.\" ------------------------------------------------------------
.Sh DESCRIPTION
.Fn vmem_free
frees resource allocated by
.Fa vmem_alloc
to the arena.
.Pp
.Bl -tag -width addr
.It Fa vm
The arena which we free to.
.It Fa addr
The resource being freed.
It must be the one returned by
.Fn vmem_alloc .
Notably, it must not be the one from
.Fn vmem_xalloc .
Otherwise, the behaviour is undefined.
.It Fa size
The size of the resource being freed.
It must be the same as the
.Fa size
argument used for
.Fn vmem_alloc .
.El
.\" ------------------------------------------------------------
.Sh SEE ALSO
.Xr intro 9 ,
.Xr vmem 9