summaryrefslogtreecommitdiffstats
path: root/sys/miscfs
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1997-09-21 04:24:27 +0000
committerdyson <dyson@FreeBSD.org>1997-09-21 04:24:27 +0000
commite64b1984f97c6d987d7d36b61a3afe5028a08312 (patch)
tree325bcf17de3aad0383fb86548872026a7c3d2599 /sys/miscfs
parent1419fcb42b4e1e5a73f4574739f4c232fde357e2 (diff)
downloadFreeBSD-src-e64b1984f97c6d987d7d36b61a3afe5028a08312.zip
FreeBSD-src-e64b1984f97c6d987d7d36b61a3afe5028a08312.tar.gz
Change the M_NAMEI allocations to use the zone allocator. This change
plus the previous changes to use the zone allocator decrease the useage of malloc by half. The Zone allocator will be upgradeable to be able to use per CPU-pools, and has more intelligent usage of SPLs. Additionally, it has reasonable stats gathering capabilities, while making most calls inline.
Diffstat (limited to 'sys/miscfs')
-rw-r--r--sys/miscfs/devfs/devfs_vnops.c4
-rw-r--r--sys/miscfs/procfs/procfs_vnops.c4
-rw-r--r--sys/miscfs/union/union_subr.c8
3 files changed, 8 insertions, 8 deletions
diff --git a/sys/miscfs/devfs/devfs_vnops.c b/sys/miscfs/devfs/devfs_vnops.c
index f735ba8..35b62af 100644
--- a/sys/miscfs/devfs/devfs_vnops.c
+++ b/sys/miscfs/devfs/devfs_vnops.c
@@ -1,7 +1,7 @@
/*
* Written by Julian Elischer (julian@DIALix.oz.au)
*
- * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vnops.c,v 1.38 1997/08/27 02:58:40 julian Exp $
+ * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vnops.c,v 1.39 1997/09/14 02:57:48 peter Exp $
*
* symlinks can wait 'til later.
*/
@@ -1432,7 +1432,7 @@ devfs_abortop(struct vop_abortop_args *ap)
{
DBPRINT(("abortop\n"));
if ((ap->a_cnp->cn_flags & (HASBUF | SAVESTART)) == HASBUF)
- FREE(ap->a_cnp->cn_pnbuf, M_NAMEI);
+ zfree(namei_zone, ap->a_cnp->cn_pnbuf);
return 0;
}
#endif /* notyet */
diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c
index d34fb2d..7912c95 100644
--- a/sys/miscfs/procfs/procfs_vnops.c
+++ b/sys/miscfs/procfs/procfs_vnops.c
@@ -36,7 +36,7 @@
*
* @(#)procfs_vnops.c 8.18 (Berkeley) 5/21/95
*
- * $Id: procfs_vnops.c,v 1.31 1997/08/12 04:34:30 sef Exp $
+ * $Id: procfs_vnops.c,v 1.32 1997/09/14 02:57:58 peter Exp $
*/
/*
@@ -351,7 +351,7 @@ procfs_abortop(ap)
{
if ((ap->a_cnp->cn_flags & (HASBUF | SAVESTART)) == HASBUF)
- FREE(ap->a_cnp->cn_pnbuf, M_NAMEI);
+ zfree(namei_zone, ap->a_cnp->cn_pnbuf);
return (0);
}
diff --git a/sys/miscfs/union/union_subr.c b/sys/miscfs/union/union_subr.c
index 7f85e65..faf9ec9 100644
--- a/sys/miscfs/union/union_subr.c
+++ b/sys/miscfs/union/union_subr.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)union_subr.c 8.20 (Berkeley) 5/20/95
- * $Id: union_subr.c,v 1.19 1997/08/02 14:32:28 bde Exp $
+ * $Id: union_subr.c,v 1.20 1997/08/14 03:57:46 kato Exp $
*/
#include <sys/param.h>
@@ -740,7 +740,7 @@ union_relookup(um, dvp, vpp, cnp, cn, path, pathlen)
* The pathname buffer will be FREEed by VOP_MKDIR.
*/
cn->cn_namelen = pathlen;
- cn->cn_pnbuf = malloc(cn->cn_namelen+1, M_NAMEI, M_WAITOK);
+ cn->cn_pnbuf = zalloc(namei_zone);
bcopy(path, cn->cn_pnbuf, cn->cn_namelen);
cn->cn_pnbuf[cn->cn_namelen] = '\0';
@@ -760,7 +760,7 @@ union_relookup(um, dvp, vpp, cnp, cn, path, pathlen)
if (!error)
vrele(dvp);
else {
- free(cn->cn_pnbuf, M_NAMEI);
+ zfree(namei_zone, cn->cn_pnbuf);
cn->cn_pnbuf = '\0';
}
@@ -906,7 +906,7 @@ union_vn_create(vpp, un, p)
* copied in the first place).
*/
cn.cn_namelen = strlen(un->un_path);
- cn.cn_pnbuf = (caddr_t) malloc(cn.cn_namelen+1, M_NAMEI, M_WAITOK);
+ cn.cn_pnbuf = zalloc(namei_zone);
bcopy(un->un_path, cn.cn_pnbuf, cn.cn_namelen+1);
cn.cn_nameiop = CREATE;
cn.cn_flags = (LOCKPARENT|HASBUF|SAVENAME|SAVESTART|ISLASTCN);
OpenPOWER on IntegriCloud