From owner-p4-projects@FreeBSD.ORG Sat Nov 26 05:29:56 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5E3E216A422; Sat, 26 Nov 2005 05:29:56 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E19816A41F for ; Sat, 26 Nov 2005 05:29:56 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D5F543D82 for ; Sat, 26 Nov 2005 05:29:49 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id jAQ5TmI9039811 for ; Sat, 26 Nov 2005 05:29:48 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id jAQ5TmWs039808 for perforce@freebsd.org; Sat, 26 Nov 2005 05:29:48 GMT (envelope-from sam@freebsd.org) Date: Sat, 26 Nov 2005 05:29:48 GMT Message-Id: <200511260529.jAQ5TmWs039808@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 87255 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2005 05:29:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=87255 Change 87255 by sam@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)