diff options
author | John Dyson <dyson@FreeBSD.org> | 1997-09-21 04:24:27 +0000 |
---|---|---|
committer | John Dyson <dyson@FreeBSD.org> | 1997-09-21 04:24:27 +0000 |
commit | 99448ed11d42574b59b878cbb42797573b951c6a (patch) | |
tree | 5ffb25ae92fa6742b04f66ca41cc830e49eb267c /sys/miscfs | |
parent | 71eed6962e8a97967e48c9c6451dd6e002c59df7 (diff) | |
download | src-99448ed11d42574b59b878cbb42797573b951c6a.tar.gz src-99448ed11d42574b59b878cbb42797573b951c6a.zip |
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.
Notes
Notes:
svn path=/head/; revision=29653
Diffstat (limited to 'sys/miscfs')
-rw-r--r-- | sys/miscfs/devfs/devfs_vnops.c | 4 | ||||
-rw-r--r-- | sys/miscfs/procfs/procfs_vnops.c | 4 | ||||
-rw-r--r-- | sys/miscfs/union/union_subr.c | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/sys/miscfs/devfs/devfs_vnops.c b/sys/miscfs/devfs/devfs_vnops.c index f735ba8940ce..35b62af17df5 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 d34fb2d53135..7912c951a080 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 7f85e65611de..faf9ec9c026c 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); |