PERFORCE change 87255 for review
Sam Leffler
sam at FreeBSD.org
Sat Nov 26 05:29:57 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=87255
Change 87255 by sam at sam_ebb on 2005/11/26 05:29:02
use separate accounting for driver memory
Affected files ...
.. //depot/projects/wifi/sys/dev/ral/if_ral.c#12 edit
Differences ...
==== //depot/projects/wifi/sys/dev/ral/if_ral.c#12 (text+ko) ====
@@ -338,6 +338,8 @@
{ 161, 0x08808, 0x0242f, 0x00281 }
};
+MALLOC_DEFINE(M_RALDEV, "raldev", "ral driver dma buffers");
+
int
ral_attach(device_t dev)
{
@@ -655,7 +657,7 @@
goto fail;
}
- ring->data = malloc(count * sizeof (struct ral_tx_data), M_DEVBUF,
+ ring->data = malloc(count * sizeof (struct ral_tx_data), M_RALDEV,
M_NOWAIT | M_ZERO);
if (ring->data == NULL) {
device_printf(sc->sc_dev, "could not allocate soft data\n");
@@ -754,7 +756,7 @@
bus_dmamap_destroy(ring->data_dmat, data->map);
}
- free(ring->data, M_DEVBUF);
+ free(ring->data, M_RALDEV);
}
if (ring->data_dmat != NULL)
@@ -795,7 +797,7 @@
goto fail;
}
- ring->data = malloc(count * sizeof (struct ral_rx_data), M_DEVBUF,
+ ring->data = malloc(count * sizeof (struct ral_rx_data), M_RALDEV,
M_NOWAIT | M_ZERO);
if (ring->data == NULL) {
device_printf(sc->sc_dev, "could not allocate soft data\n");
@@ -900,7 +902,7 @@
bus_dmamap_destroy(ring->data_dmat, data->map);
}
- free(ring->data, M_DEVBUF);
+ free(ring->data, M_RALDEV);
}
if (ring->data_dmat != NULL)
More information about the p4-projects
mailing list