TO_REMOVE+=/usr/share/zoneinfo/Europe/Tiraspol
TO_REMOVE+=/usr/include/netatalk
TO_REMOVE+=/usr/include/netproto/atalk
+TO_REMOVE+=/usr/share/man/cat9/MALLOC.9.gz
+TO_REMOVE+=/usr/share/man/man9/MALLOC.9.gz
+TO_REMOVE+=/usr/share/man/cat9/FREE.9.gz
+TO_REMOVE+=/usr/share/man/man9/FREE.9.gz
.if ${MACHINE_ARCH} == "x86_64"
TO_REMOVE+=/usr/libdata/stallion/2681.sys
kenv.9 ktestenv.9 \
kenv.9 kunsetenv.9
MLINKS+=kernacc.9 useracc.9
-MLINKS+=kmalloc.9 FREE.9 \
- kmalloc.9 kfree.9 \
+MLINKS+=kmalloc.9 kfree.9 \
kmalloc.9 krealloc.9 \
- kmalloc.9 MALLOC.9 \
kmalloc.9 MALLOC_DECLARE.9 \
kmalloc.9 MALLOC_DEFINE.9
MLINKS+=kobj.9 DEFINE_CLASS.9 \
.\"
.\" $NetBSD: malloc.9,v 1.3 1996/11/11 00:05:11 lukem Exp $
.\" $FreeBSD: src/share/man/man9/malloc.9,v 1.42 2005/02/22 17:20:20 brueffer Exp $
-.\" $DragonFly: src/share/man/man9/kmalloc.9,v 1.8 2008/01/19 08:23:17 swildner Exp $
.\"
.Dd January 15, 2010
.Dt KMALLOC 9
.Os
.Sh NAME
.Nm kmalloc ,
-.Nm MALLOC ,
.Nm kfree ,
-.Nm FREE ,
.Nm krealloc ,
.Nm MALLOC_DEFINE ,
.Nm MALLOC_DECLARE
.In sys/malloc.h
.Ft void *
.Fn kmalloc "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 kfree "void *addr" "struct malloc_type *type"
-.Fn FREE "void *addr" "struct malloc_type *type"
.Ft void *
.Fn krealloc "void *addr" "unsigned long size" "struct malloc_type *type" "int flags"
.Fn MALLOC_DECLARE type
.Fn kmalloc
for the specified size.
.Pp
-The
-.Fn MALLOC
-macro variant is functionally equivalent to
-.Bd -literal -offset indent
-(space) = (cast)kmalloc((u_long)(size), type, flags)
-.Ed
-.Pp
-and the
-.Fn FREE
-macro variant is equivalent to
-.Bd -literal -offset indent
-kfree((addr), type)
-.Ed
-.Pp
Unlike its standard C library counterpart
.Pq Xr malloc 3 ,
the kernel version takes two more arguments.
/* sys/something/foo_subr.c */
\&...
-MALLOC(buf, struct foo_buf *, sizeof *buf, M_FOOBUF, M_NOWAIT);
+buf = kmalloc(sizeof *buf, M_FOOBUF, M_NOWAIT);
.Ed
.Sh IMPLEMENTATION NOTES
*
* @(#)malloc.h 8.5 (Berkeley) 5/3/95
* $FreeBSD: src/sys/sys/malloc.h,v 1.48.2.2 2002/03/16 02:19:16 archie Exp $
- * $DragonFly: src/sys/sys/malloc.h,v 1.30 2008/10/22 01:42:15 dillon Exp $
*/
#ifndef _SYS_MALLOC_H_
#define MINALLOCSIZE sizeof(void *)
/*
- * Deprecated macro versions of not-quite-malloc() and free().
- */
-#define MALLOC(space, cast, size, type, flags) \
- (space) = (cast)kmalloc((u_long)(size), (type), (flags))
-#define FREE(addr, type) kfree((addr), (type))
-
-/*
* XXX this should be declared in <sys/uio.h>, but that tends to fail
* because <sys/uio.h> is included in a header before the source file
* has a chance to include <sys/malloc.h> to get MALLOC_DECLARE() defined.