malloc.9 (233648) | malloc.9 (238542) |
---|---|
1.\" 2.\" Copyright (c) 1996 The NetBSD Foundation, Inc. 3.\" All rights reserved. 4.\" 5.\" This code is derived from software contributed to The NetBSD Foundation 6.\" by Paul Kranenburg. 7.\" 8.\" Redistribution and use in source and binary forms, with or without --- 13 unchanged lines hidden (view full) --- 22.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27.\" POSSIBILITY OF SUCH DAMAGE. 28.\" 29.\" $NetBSD: malloc.9,v 1.3 1996/11/11 00:05:11 lukem Exp $ | 1.\" 2.\" Copyright (c) 1996 The NetBSD Foundation, Inc. 3.\" All rights reserved. 4.\" 5.\" This code is derived from software contributed to The NetBSD Foundation 6.\" by Paul Kranenburg. 7.\" 8.\" Redistribution and use in source and binary forms, with or without --- 13 unchanged lines hidden (view full) --- 22.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27.\" POSSIBILITY OF SUCH DAMAGE. 28.\" 29.\" $NetBSD: malloc.9,v 1.3 1996/11/11 00:05:11 lukem Exp $ |
30.\" $FreeBSD: head/share/man/man9/malloc.9 233648 2012-03-29 05:02:12Z eadler $ | 30.\" $FreeBSD: head/share/man/man9/malloc.9 238542 2012-07-17 02:05:39Z kevlo $ |
31.\" 32.Dd January 28, 2012 33.Dt MALLOC 9 34.Os 35.Sh NAME 36.Nm malloc , 37.Nm free , 38.Nm realloc , --- 153 unchanged lines hidden (view full) --- 192 193/* sys/something/foo_main.c */ 194 195MALLOC_DEFINE(M_FOOBUF, "foobuffers", "Buffers to foo data into the ether"); 196 197/* sys/something/foo_subr.c */ 198 199\&... | 31.\" 32.Dd January 28, 2012 33.Dt MALLOC 9 34.Os 35.Sh NAME 36.Nm malloc , 37.Nm free , 38.Nm realloc , --- 153 unchanged lines hidden (view full) --- 192 193/* sys/something/foo_main.c */ 194 195MALLOC_DEFINE(M_FOOBUF, "foobuffers", "Buffers to foo data into the ether"); 196 197/* sys/something/foo_subr.c */ 198 199\&... |
200buf = malloc(sizeof *buf, M_FOOBUF, M_NOWAIT); | 200buf = malloc(sizeof(*buf), M_FOOBUF, M_NOWAIT); |
201 202.Ed 203.Pp 204In order to use 205.Fn MALLOC_DEFINE , 206one must include 207.In sys/param.h 208(instead of --- 78 unchanged lines hidden --- | 201 202.Ed 203.Pp 204In order to use 205.Fn MALLOC_DEFINE , 206one must include 207.In sys/param.h 208(instead of --- 78 unchanged lines hidden --- |