explicitly note MALLOC-free and malloc-FREE is ok.
This commit is contained in:
parent
e0b0d04377
commit
b509ec99bb
@ -1,4 +1,4 @@
|
|||||||
.\" $NetBSD: malloc.9,v 1.31 2003/04/16 13:35:30 wiz Exp $
|
.\" $NetBSD: malloc.9,v 1.32 2003/06/19 15:11:49 yamt Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 1996, 2003 The NetBSD Foundation, Inc.
|
.\" Copyright (c) 1996, 2003 The NetBSD Foundation, Inc.
|
||||||
.\" All rights reserved.
|
.\" All rights reserved.
|
||||||
@ -34,7 +34,7 @@
|
|||||||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
.\" POSSIBILITY OF SUCH DAMAGE.
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.Dd January 31, 2003
|
.Dd June 19, 2003
|
||||||
.Dt MALLOC 9
|
.Dt MALLOC 9
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -141,12 +141,18 @@ The
|
|||||||
macro is intended to be used with a compile-time constant
|
macro is intended to be used with a compile-time constant
|
||||||
.Fa size
|
.Fa size
|
||||||
so that the compiler can do constant folding.
|
so that the compiler can do constant folding.
|
||||||
The
|
In the comparison to
|
||||||
|
.Fn malloc
|
||||||
|
and
|
||||||
|
.Fn free
|
||||||
|
functions, the
|
||||||
.Fn MALLOC
|
.Fn MALLOC
|
||||||
and
|
and
|
||||||
.Fn FREE
|
.Fn FREE
|
||||||
macros may be faster for some fixed-size allocations, at the cost of
|
macros may be faster, at the cost of increased code size.
|
||||||
increased code size.
|
There is no difference between the memory allocated with MALLOC and malloc.
|
||||||
|
i.e., no matter which MALLOC or malloc is used to allocate the memory,
|
||||||
|
either FREE or free can be used to free it.
|
||||||
.Pp
|
.Pp
|
||||||
Unlike its standard C library counterpart
|
Unlike its standard C library counterpart
|
||||||
.Pq Xr malloc 3 ,
|
.Pq Xr malloc 3 ,
|
||||||
|
Loading…
Reference in New Issue
Block a user