diff options
author | des <des@FreeBSD.org> | 2008-10-23 15:53:51 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2008-10-23 15:53:51 +0000 |
commit | 66f807ed8b3634dc73d9f7526c484e43f094c0ee (patch) | |
tree | 21e792ce590e1bcf9b343890605a1b4c6a9016b3 /share/man/man9/malloc.9 | |
parent | a779c60ce0a41cd14710a8a12cfa22955108b27a (diff) | |
download | FreeBSD-src-66f807ed8b3634dc73d9f7526c484e43f094c0ee.zip FreeBSD-src-66f807ed8b3634dc73d9f7526c484e43f094c0ee.tar.gz |
Retire the MALLOC and FREE macros. They are an abomination unto style(9).
MFC after: 3 months
Diffstat (limited to 'share/man/man9/malloc.9')
-rw-r--r-- | share/man/man9/malloc.9 | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/share/man/man9/malloc.9 b/share/man/man9/malloc.9 index 1061266..76aa83a 100644 --- a/share/man/man9/malloc.9 +++ b/share/man/man9/malloc.9 @@ -36,14 +36,12 @@ .\" $NetBSD: malloc.9,v 1.3 1996/11/11 00:05:11 lukem Exp $ .\" $FreeBSD$ .\" -.Dd June 12, 2003 +.Dd October 23, 2008 .Dt MALLOC 9 .Os .Sh NAME .Nm malloc , -.Nm MALLOC , .Nm free , -.Nm FREE , .Nm realloc , .Nm reallocf , .Nm MALLOC_DEFINE , @@ -54,10 +52,8 @@ .In sys/malloc.h .Ft void * .Fn malloc "unsigned long size" "struct malloc_type *type" "int flags" -.Fn MALLOC space cast "unsigned long size" "struct malloc_type *type" "int flags" .Ft void .Fn free "void *addr" "struct malloc_type *type" -.Fn FREE "void *addr" "struct malloc_type *type" .Ft void * .Fn realloc "void *addr" "unsigned long size" "struct malloc_type *type" "int flags" .Ft void * @@ -123,20 +119,6 @@ function is identical to except that it will free the passed pointer when the requested memory cannot be allocated. .Pp -The -.Fn MALLOC -macro variant is functionally equivalent to -.Bd -literal -offset indent -(space) = (cast)malloc((u_long)(size), type, flags) -.Ed -.Pp -and the -.Fn FREE -macro variant is equivalent to -.Bd -literal -offset indent -free((addr), type) -.Ed -.Pp Unlike its standard C library counterpart .Pq Xr malloc 3 , the kernel version takes two more arguments. @@ -219,7 +201,7 @@ MALLOC_DEFINE(M_FOOBUF, "foobuffers", "Buffers to foo data into the ether"); /* sys/something/foo_subr.c */ \&... -MALLOC(buf, struct foo_buf *, sizeof *buf, M_FOOBUF, M_NOWAIT); +buf = malloc(sizeof *buf, M_FOOBUF, M_NOWAIT); .Ed .Pp |