summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe/rf_map.c
diff options
context:
space:
mode:
authoroster <oster@NetBSD.org>2004-03-19 15:16:18 +0000
committeroster <oster@NetBSD.org>2004-03-19 15:16:18 +0000
commitb2c52e1175eac9a52a1598c990b557c22c458f84 (patch)
tree253fc2a2370a7ac5ae5758bc67fc823c8af64d43 /sys/dev/raidframe/rf_map.c
parentd085bb26a1f12cec74f8382a8d09e92dcaeca07c (diff)
Take care of six more mallocs:
- Pull rf_FreePhysDiskAddr() out from under a #ifdef, since we're now going to use it. - Add a pda_cleanup_list into the DAG header. Use it in rf_FreeDAG() to cleanup any PDA's that get allocated but have no "easy" way of being located and freed when the DAG completes. - numStripeUnitsAccessed is a per-stripe value, and has a maximum value equal to the number of colums (thus limited by RF_MAXCOL). Use this knowledge to set a high-bound on overlappingPDAs, and stuff it on the stack instead of malloc'ing it all the time! This costs us a whopping 40 bytes on the stack, but saves a malloc() and a free().
Diffstat (limited to 'sys/dev/raidframe/rf_map.c')
-rw-r--r--sys/dev/raidframe/rf_map.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/raidframe/rf_map.c b/sys/dev/raidframe/rf_map.c
index cbaa07c545b..c40f557e632 100644
--- a/sys/dev/raidframe/rf_map.c
+++ b/sys/dev/raidframe/rf_map.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_map.c,v 1.35 2004/03/19 02:57:34 oster Exp $ */
+/* $NetBSD: rf_map.c,v 1.36 2004/03/19 15:16:18 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -33,7 +33,7 @@
**************************************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_map.c,v 1.35 2004/03/19 02:57:34 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_map.c,v 1.36 2004/03/19 15:16:18 oster Exp $");
#include <dev/raidframe/raidframevar.h>
@@ -471,13 +471,11 @@ rf_AllocPDAList(int count)
return (p);
}
-#if RF_INCLUDE_PARITYLOGGING > 0
void
rf_FreePhysDiskAddr(RF_PhysDiskAddr_t *p)
{
pool_put(&rf_pools.pda, p);
}
-#endif
static void
rf_FreePDAList(RF_PhysDiskAddr_t *pda_list)