* SUCH DAMAGE.
*
* $FreeBSD: src/sys/cam/scsi/scsi_ch.c,v 1.20.2.2 2000/10/31 08:09:49 dwmalone Exp $
- * $DragonFly: src/sys/bus/cam/scsi/scsi_ch.c,v 1.15 2006/09/05 00:55:32 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/scsi/scsi_ch.c,v 1.16 2006/09/05 03:48:07 dillon Exp $
*/
/*
* Derived from the NetBSD SCSI changer driver.
}
user_data = (struct changer_element_status *)
- malloc(avail * sizeof(struct changer_element_status),
+ kmalloc(avail * sizeof(struct changer_element_status),
M_DEVBUF, M_INTWAIT | M_ZERO);
desc = (struct read_element_status_descriptor *)((uintptr_t)data +
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/eisa/eisaconf.c,v 1.55 2000/01/14 07:13:57 peter Exp $
- * $DragonFly: src/sys/bus/eisa/eisaconf.c,v 1.7 2006/09/05 00:55:34 dillon Exp $
+ * $DragonFly: src/sys/bus/eisa/eisaconf.c,v 1.8 2006/09/05 03:48:08 dillon Exp $
*/
#include "opt_eisa.h"
if (eisa_get_slot(dev) != 0)
return (ENXIO);
- idstring = malloc(8 + sizeof(" (System Board)") + 1,
+ idstring = kmalloc(8 + sizeof(" (System Board)") + 1,
M_DEVBUF, M_INTWAIT);
sprintf(idstring, "%c%c%c%03x%01x (System Board)",
EISA_MFCTR_CHAR0(id),
* POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/firewire/firewire.c,v 1.68 2004/01/08 14:58:09 simokawa Exp $
- * $DragonFly: src/sys/bus/firewire/firewire.c,v 1.15 2006/09/05 00:55:35 dillon Exp $
+ * $DragonFly: src/sys/bus/firewire/firewire.c,v 1.16 2006/09/05 03:48:09 dillon Exp $
*
*/
fc->it[i]->maxq = FWMAXQUEUE;
}
/* Initialize csr registers */
- fc->topology_map = malloc(sizeof(struct fw_topology_map),
+ fc->topology_map = kmalloc(sizeof(struct fw_topology_map),
M_FW, M_WAITOK | M_ZERO);
- fc->speed_map = malloc(sizeof(struct fw_speed_map),
+ fc->speed_map = kmalloc(sizeof(struct fw_speed_map),
M_FW, M_WAITOK | M_ZERO);
CSRARC(fc, TOPO_MAP) = 0x3f1 << 16;
CSRARC(fc, TOPO_MAP + 4) = 1;
* POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/firewire/fwdev.c,v 1.36 2004/01/22 14:41:17 simokawa Exp $
- * $DragonFly: src/sys/bus/firewire/fwdev.c,v 1.13 2006/09/05 00:55:35 dillon Exp $
+ * $DragonFly: src/sys/bus/firewire/fwdev.c,v 1.14 2006/09/05 03:48:09 dillon Exp $
*
*/
if (q->flag & (FWXFERQ_RUNNING | FWXFERQ_EXTBUF))
return(EBUSY);
- q->bulkxfer = (struct fw_bulkxfer *) malloc(
+ q->bulkxfer = (struct fw_bulkxfer *) kmalloc(
sizeof(struct fw_bulkxfer) * b->nchunk,
M_FW, M_WAITOK);
if (q->bulkxfer == NULL)
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $DragonFly: src/sys/bus/firewire/fwdma.c,v 1.6 2006/09/05 00:55:35 dillon Exp $
+ * $DragonFly: src/sys/bus/firewire/fwdma.c,v 1.7 2006/09/05 03:48:09 dillon Exp $
*/
#ifndef __DragonFly__
ssize = rounddown(PAGE_SIZE, esize);
nseg = howmany(n, ssize / esize);
}
- am = (struct fwdma_alloc_multi *)malloc(sizeof(struct fwdma_alloc_multi)
+ am = (struct fwdma_alloc_multi *)kmalloc(sizeof(struct fwdma_alloc_multi)
+ sizeof(struct fwdma_seg)*nseg, M_FW, M_WAITOK);
if (am == NULL) {
printf("fwdma_malloc_multiseg: malloc failed\n");
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $DragonFly: src/sys/bus/firewire/fwmem.c,v 1.11 2006/09/05 00:55:35 dillon Exp $
+ * $DragonFly: src/sys/bus/firewire/fwmem.c,v 1.12 2006/09/05 03:48:09 dillon Exp $
*/
#ifndef __DragonFly__
fms = (struct fwmem_softc *)dev->si_drv1;
fms->refcount ++;
} else {
- fms = (struct fwmem_softc *)malloc(sizeof(struct fwmem_softc),
+ fms = (struct fwmem_softc *)kmalloc(sizeof(struct fwmem_softc),
M_FWMEM, M_WAITOK);
if (fms == NULL)
return ENOMEM;
*
* $FreeBSD: src/sys/dev/firewire/fwohci.c,v 1.72 2004/01/22 14:41:17 simokawa Exp $
* $FreeBSD: src/sys/dev/firewire/fwohci.c,v 1.1.2.19 2003/05/01 06:24:37 simokawa Exp $
- * $DragonFly: src/sys/bus/firewire/fwohci.c,v 1.11 2006/09/05 00:55:35 dillon Exp $
+ * $DragonFly: src/sys/bus/firewire/fwohci.c,v 1.12 2006/09/05 03:48:09 dillon Exp $
*/
#define ATRQ_CH 0
/* DB entry must start at 16 bytes bounary. */
STAILQ_INIT(&dbch->db_trq);
db_tr = (struct fwohcidb_tr *)
- malloc(sizeof(struct fwohcidb_tr) * dbch->ndb,
+ kmalloc(sizeof(struct fwohcidb_tr) * dbch->ndb,
M_FW, M_WAITOK | M_ZERO);
if(db_tr == NULL){
printf("fwohci_db_init: malloc(1) failed\n");
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/isa/pnpparse.c,v 1.14 2003/06/11 00:32:45 obrien Exp $
- * $DragonFly: src/sys/bus/isa/pnpparse.c,v 1.7 2006/09/05 00:55:35 dillon Exp $
+ * $DragonFly: src/sys/bus/isa/pnpparse.c,v 1.8 2006/09/05 03:48:09 dillon Exp $
*/
#include <sys/param.h>
parent = device_get_parent(dev);
id = isa_get_logicalid(dev);
- configs = malloc(sizeof(*configs)*(1 + MAXDEP),
+ configs = kmalloc(sizeof(*configs)*(1 + MAXDEP),
M_DEVBUF, M_WAITOK | M_ZERO);
config = &configs[0];
priorities[0] = 0;
/* $NetBSD: pcmcia_cis.c,v 1.17 2000/02/10 09:01:52 chopps Exp $ */
/* $FreeBSD: src/sys/dev/pccard/pccard_cis.c,v 1.23 2002/11/14 14:02:32 mux Exp $ */
-/* $DragonFly: src/sys/bus/pccard/pccard_cis.c,v 1.4 2006/09/05 00:55:36 dillon Exp $ */
+/* $DragonFly: src/sys/bus/pccard/pccard_cis.c,v 1.5 2006/09/05 03:48:09 dillon Exp $ */
/*
* Copyright (c) 1997 Marc Horowitz. All rights reserved.
break;
}
if (state->pf == NULL) {
- state->pf = malloc(sizeof(*state->pf),
+ state->pf = kmalloc(sizeof(*state->pf),
M_DEVBUF, M_INTWAIT | M_ZERO);
state->pf->number = state->count++;
state->pf->last_config_index = -1;
* $NetBSD: uhci.c,v 1.80 2000/01/19 01:16:38 augustss Exp $
* $NetBSD: uhci.c,v 1.170 2003/02/19 01:35:04 augustss Exp $
* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.149 2003/11/10 00:08:41 joe Exp $
- * $DragonFly: src/sys/bus/usb/uhci.c,v 1.15 2006/09/05 00:55:36 dillon Exp $
+ * $DragonFly: src/sys/bus/usb/uhci.c,v 1.16 2006/09/05 03:48:09 dillon Exp $
*/
/* Also already incorporated from NetBSD:
int i;
iso = &upipe->u.iso;
- iso->stds = malloc(UHCI_VFRAMELIST_COUNT * sizeof (uhci_soft_td_t *),
+ iso->stds = kmalloc(UHCI_VFRAMELIST_COUNT * sizeof (uhci_soft_td_t *),
M_USBHC, M_INTWAIT);
token = rd ? UHCI_TD_IN (0, endpt, addr, 0) :
/*
* $NetBSD: uhub.c,v 1.64 2003/02/08 03:32:51 ichiro Exp $
* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.54 2003/08/24 17:55:55 obrien Exp $
- * $DragonFly: src/sys/bus/usb/uhub.c,v 1.7 2006/09/05 00:55:36 dillon Exp $
+ * $DragonFly: src/sys/bus/usb/uhub.c,v 1.8 2006/09/05 03:48:09 dillon Exp $
*/
/*
USBDEVNAME(sc->sc_dev), nports, nports != 1 ? "s" : "",
nremov, dev->self_powered ? "self" : "bus");
- hub = malloc(sizeof(*hub) + (nports-1) * sizeof(struct usbd_port),
+ hub = kmalloc(sizeof(*hub) + (nports-1) * sizeof(struct usbd_port),
M_USBDEV, M_WAITOK);
dev->hub = hub;
dev->hub->hubsoftc = sc;
/*
* $NetBSD: usb_subr.c,v 1.99 2002/07/11 21:14:34 augustss Exp $
* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.58 2003/09/01 07:47:42 ticso Exp $
- * $DragonFly: src/sys/bus/usb/usb_subr.c,v 1.12 2006/09/05 00:55:36 dillon Exp $
+ * $DragonFly: src/sys/bus/usb/usb_subr.c,v 1.13 2006/09/05 03:48:09 dillon Exp $
*/
/* Also already have from NetBSD:
nendpt = ifc->idesc->bNumEndpoints;
DPRINTFN(4,("usbd_fill_iface_data: found idesc nendpt=%d\n", nendpt));
if (nendpt != 0) {
- ifc->endpoints = malloc(nendpt * sizeof(struct usbd_endpoint),
+ ifc->endpoints = kmalloc(nendpt * sizeof(struct usbd_endpoint),
M_USB, M_INTWAIT);
} else {
ifc->endpoints = NULL;
/* Allocate and fill interface data. */
nifc = cdp->bNumInterface;
- dev->ifaces = malloc(nifc * sizeof(struct usbd_interface),
+ dev->ifaces = kmalloc(nifc * sizeof(struct usbd_interface),
M_USB, M_INTWAIT);
DPRINTFN(5,("usbd_set_config_index: dev=%p cdesc=%p\n", dev, cdp));
dev->cdesc = cdp;
# as much of the source tree as it can.
#
# $FreeBSD: src/sys/i386/conf/LINT,v 1.749.2.144 2003/06/04 17:56:59 sam Exp $
-# $DragonFly: src/sys/config/LINT,v 1.91 2006/09/03 09:07:20 sephe Exp $
+# $DragonFly: src/sys/config/LINT,v 1.92 2006/09/05 03:48:11 dillon Exp $
#
# NB: You probably don't want to try running a kernel built from this
# file. Instead, you should start from GENERIC, and add options from
#makeoptions INSTALLSTRIPPED=1
#makeoptions INSTALLSTRIPPEDMODULES=1
+options KMALLOC_ONLY
+
#
# Certain applications can grow to be larger than the 128M limit
# that FreeBSD initially imposes. Below are some options to
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/acpica/acpi_cmbat.c,v 1.29 2004/05/30 20:08:23 phk Exp $
- * $DragonFly: src/sys/dev/acpica5/acpi_cmbat.c,v 1.7 2006/09/05 00:55:36 dillon Exp $
+ * $DragonFly: src/sys/dev/acpica5/acpi_cmbat.c,v 1.8 2006/09/05 03:48:09 dillon Exp $
*/
#include "opt_acpi.h"
}
if (bat == NULL) {
bat_units = acpi_cmbat_units;
- bat = malloc(sizeof(struct acpi_cmbat_softc *) * bat_units,
+ bat = kmalloc(sizeof(struct acpi_cmbat_softc *) * bat_units,
M_ACPICMBAT, M_INTWAIT);
/* Collect softc pointers */
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/acpica/acpi_cpu.c,v 1.41 2004/06/24 00:38:51 njl Exp $
- * $DragonFly: src/sys/dev/acpica5/acpi_cpu.c,v 1.13 2006/08/07 23:27:22 y0netan1 Exp $
+ * $DragonFly: src/sys/dev/acpica5/acpi_cpu.c,v 1.14 2006/09/05 03:48:09 dillon Exp $
*/
#include "opt_acpi.h"
handle = acpi_get_handle(dev);
if (cpu_softc == NULL)
- cpu_softc = malloc(sizeof(struct acpi_cpu_softc *) *
+ cpu_softc = kmalloc(sizeof(struct acpi_cpu_softc *) *
SMP_MAXCPU, M_TEMP /* XXX */, M_INTWAIT | M_ZERO);
/* Get our Processor object. */
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/pci/agp_amd.c,v 1.3.2.4 2002/04/25 23:41:36 cokane Exp $
- * $DragonFly: src/sys/dev/agp/agp_amd.c,v 1.6 2006/09/05 00:55:36 dillon Exp $
+ * $DragonFly: src/sys/dev/agp/agp_amd.c,v 1.7 2006/09/05 03:48:09 dillon Exp $
*/
#include "opt_bus.h"
* directory.
*/
gatt->ag_entries = entries;
- gatt->ag_virtual = malloc(entries * sizeof(u_int32_t),
+ gatt->ag_virtual = kmalloc(entries * sizeof(u_int32_t),
M_AGP, M_INTWAIT | M_ZERO);
/*
/* $FreeBSD: src/sys/dev/ubsec/ubsec.c,v 1.6.2.12 2003/06/04 17:56:59 sam Exp $ */
-/* $DragonFly: src/sys/dev/crypto/ubsec/ubsec.c,v 1.10 2006/09/05 00:55:37 dillon Exp $ */
+/* $DragonFly: src/sys/dev/crypto/ubsec/ubsec.c,v 1.11 2006/09/05 03:48:09 dillon Exp $ */
/* $OpenBSD: ubsec.c,v 1.115 2002/09/24 18:33:26 jason Exp $ */
/*
return (EINVAL);
if (sc->sc_sessions == NULL) {
- ses = sc->sc_sessions = malloc(sizeof(struct ubsec_session),
+ ses = sc->sc_sessions = kmalloc(sizeof(struct ubsec_session),
M_DEVBUF, M_INTWAIT);
sesn = 0;
sc->sc_nsessions = 1;
if (ses == NULL) {
sesn = sc->sc_nsessions;
- ses = malloc((sesn + 1) * sizeof(struct ubsec_session),
+ ses = kmalloc((sesn + 1) * sizeof(struct ubsec_session),
M_DEVBUF, M_INTWAIT);
bcopy(sc->sc_sessions, ses, sesn *
sizeof(struct ubsec_session));
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#198 $
*
* $FreeBSD: src/sys/dev/aic7xxx/aic79xx.c,v 1.3.2.5 2003/06/10 03:26:07 gibbs Exp $
- * $DragonFly: src/sys/dev/disk/aic7xxx/aic79xx.c,v 1.8 2006/09/05 00:55:37 dillon Exp $
+ * $DragonFly: src/sys/dev/disk/aic7xxx/aic79xx.c,v 1.9 2006/09/05 03:48:09 dillon Exp $
*/
#include "aic79xx_osm.h"
AHD_ASSERT_MODES(ahd, AHD_MODE_SCSI_MSK, AHD_MODE_SCSI_MSK);
ahd->stack_size = ahd_probe_stack_size(ahd);
- ahd->saved_stack = malloc(ahd->stack_size * sizeof(uint16_t),
+ ahd->saved_stack = kmalloc(ahd->stack_size * sizeof(uint16_t),
M_DEVBUF, M_WAITOK);
/*
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#134 $
*
* $FreeBSD: src/sys/dev/aic7xxx/aic7xxx.c,v 1.41.2.27 2003/06/10 03:26:08 gibbs Exp $
- * $DragonFly: src/sys/dev/disk/aic7xxx/aic7xxx.c,v 1.8 2006/09/05 00:55:37 dillon Exp $
+ * $DragonFly: src/sys/dev/disk/aic7xxx/aic7xxx.c,v 1.9 2006/09/05 03:48:09 dillon Exp $
*/
#include "aic7xxx_osm.h"
ahc = device_get_softc((device_t)platform_arg);
#endif
memset(ahc, 0, sizeof(*ahc));
- ahc->seep_config = malloc(sizeof(*ahc->seep_config),
+ ahc->seep_config = kmalloc(sizeof(*ahc->seep_config),
M_DEVBUF, M_WAITOK);
LIST_INIT(&ahc->pending_scbs);
/* We don't know our unit number until the OSM sets it */
ahc->pause = ahc->unpause | PAUSE;
/* XXX The shared scb data stuff should be deprecated */
if (ahc->scb_data == NULL) {
- ahc->scb_data = malloc(sizeof(*ahc->scb_data),
+ ahc->scb_data = kmalloc(sizeof(*ahc->scb_data),
M_DEVBUF, M_WAITOK | M_ZERO);
}
SLIST_INIT(&scb_data->sg_maps);
/* Allocate SCB resources */
- scb_data->scbarray = malloc(sizeof(struct scb) * AHC_SCB_MAX_ALLOC,
+ scb_data->scbarray = kmalloc(sizeof(struct scb) * AHC_SCB_MAX_ALLOC,
M_DEVBUF, M_INTWAIT | M_ZERO);
/* Determine the number of hardware SCBs and initialize them */
/* $FreeBSD: src/sys/dev/ccd/ccd.c,v 1.73.2.1 2001/09/11 09:49:52 kris Exp $ */
-/* $DragonFly: src/sys/dev/disk/ccd/ccd.c,v 1.35 2006/09/05 00:55:37 dillon Exp $ */
+/* $DragonFly: src/sys/dev/disk/ccd/ccd.c,v 1.36 2006/09/05 03:48:10 dillon Exp $ */
/* $NetBSD: ccd.c,v 1.22 1995/12/08 19:13:26 thorpej Exp $ */
cs->sc_nccdisks = ccd->ccd_ndev;
/* Allocate space for the component info. */
- cs->sc_cinfo = malloc(cs->sc_nccdisks * sizeof(struct ccdcinfo),
+ cs->sc_cinfo = kmalloc(cs->sc_nccdisks * sizeof(struct ccdcinfo),
M_DEVBUF, M_WAITOK);
/*
* Allocate space for ii_index. We might allocate more then
* we use.
*/
- ii->ii_index = malloc((sizeof(int) * cs->sc_nccdisks),
+ ii->ii_index = kmalloc((sizeof(int) * cs->sc_nccdisks),
M_DEVBUF, M_WAITOK);
/*
* Allocate space for and copy in the array of
* componet pathnames and device numbers.
*/
- cpp = malloc(ccio->ccio_ndisks * sizeof(char *),
+ cpp = kmalloc(ccio->ccio_ndisks * sizeof(char *),
M_DEVBUF, M_WAITOK);
- vpp = malloc(ccio->ccio_ndisks * sizeof(struct vnode *),
+ vpp = kmalloc(ccio->ccio_ndisks * sizeof(struct vnode *),
M_DEVBUF, M_WAITOK);
error = copyin((caddr_t)ccio->ccio_disks, (caddr_t)cpp,
/* $FreeBSD: src/sys/dev/ispfw/ispfw.c,v 1.2.2.5 2002/10/12 00:13:09 mjacob Exp $ */
-/* $DragonFly: src/sys/dev/disk/ispfw/ispfw.c,v 1.6 2006/09/05 00:55:37 dillon Exp $ */
+/* $DragonFly: src/sys/dev/disk/ispfw/ispfw.c,v 1.7 2006/09/05 03:48:10 dillon Exp $ */
/*
* ISP Firmware Helper Pseudo Device for FreeBSD
*
if (callp[i] == caller)
return (1);
}
- newcallp = malloc((ncallers + 1) * sizeof (const u_int16_t ***),
+ newcallp = kmalloc((ncallers + 1) * sizeof (const u_int16_t ***),
M_DEVBUF, M_WAITOK);
for (i = 0; i < ncallers; i++) {
newcallp[i] = callp[i];
* POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/firewire/sbp.c,v 1.74 2004/01/08 14:58:09 simokawa Exp $
- * $DragonFly: src/sys/dev/disk/sbp/sbp.c,v 1.17 2006/09/05 00:55:38 dillon Exp $
+ * $DragonFly: src/sys/dev/disk/sbp/sbp.c,v 1.18 2006/09/05 03:48:10 dillon Exp $
*
*/
* note: realloc() does not support M_ZERO. We must zero
* the extended region manually.
*/
- newluns = realloc(target->luns,
+ newluns = krealloc(target->luns,
sizeof(struct sbp_dev *) * maxlun,
M_SBP, M_WAITOK);
sdev = target->luns[lun];
if (sdev == NULL) {
- sdev = malloc(sizeof(struct sbp_dev),
+ sdev = kmalloc(sizeof(struct sbp_dev),
M_SBP, M_WAITOK | M_ZERO);
target->luns[lun] = sdev;
sdev->lun_id = lun;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/trm/trm.c,v 1.2.2.2 2002/12/19 20:34:45 cognet Exp $
- * $DragonFly: src/sys/dev/disk/trm/trm.c,v 1.11 2006/08/03 16:40:47 swildner Exp $
+ * $DragonFly: src/sys/dev/disk/trm/trm.c,v 1.12 2006/09/05 03:48:10 dillon Exp $
*/
/*
if (pACB->AdaptSCSIID != i) {
for (j = 0; j < (pACB->max_lun +1); j++) {
pACB->scan_devices[i][j] = 1;
- pACB->pDCB[i][j]= (PDCB) malloc (
+ pACB->pDCB[i][j]= (PDCB) kmalloc (
sizeof (struct _DCB), M_DEVBUF, M_WAITOK);
trm_initDCB(pACB,
pACB->pDCB[i][j], unit, i, j);
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/ppbus/vpoio.c,v 1.10.2.3 2001/10/02 05:27:20 nsouch Exp $
- * $DragonFly: src/sys/dev/disk/vpo/vpoio.c,v 1.6 2005/02/17 13:59:35 joerg Exp $
+ * $DragonFly: src/sys/dev/disk/vpo/vpoio.c,v 1.7 2006/09/05 03:48:10 dillon Exp $
*
*/
device_t ppbus = device_get_parent(vpo->vpo_dev);
int error = 0;
- vpo->vpo_nibble_inbyte_msq = malloc(sizeof(nibble_inbyte_submicroseq),
+ vpo->vpo_nibble_inbyte_msq = kmalloc(sizeof(nibble_inbyte_submicroseq),
M_DEVBUF, M_WAITOK);
bcopy((void *)nibble_inbyte_submicroseq,
* Gareth Hughes <gareth@valinux.com>
*
* $FreeBSD: src/sys/dev/drm/drm_ioctl.h,v 1.4.2.1 2003/04/26 07:05:28 anholt Exp $
- * $DragonFly: src/sys/dev/drm/Attic/drm_ioctl.h,v 1.3 2004/02/13 01:23:57 joerg Exp $
+ * $DragonFly: src/sys/dev/drm/Attic/drm_ioctl.h,v 1.4 2006/09/05 03:48:10 dillon Exp $
*/
#include "dev/drm/drmP.h"
break;
}
- free(kids, M_TEMP);
+ kfree(kids, M_TEMP);
if (i != num_kids)
id.irq = pci_get_irq(dev);
* Gareth Hughes <gareth@valinux.com>
*
* $FreeBSD: src/sys/dev/drm/drm_memory.h,v 1.8.2.1 2003/04/26 07:05:28 anholt Exp $
- * $DragonFly: src/sys/dev/drm/Attic/drm_memory.h,v 1.4 2004/05/13 19:44:32 dillon Exp $
+ * $DragonFly: src/sys/dev/drm/Attic/drm_memory.h,v 1.5 2006/09/05 03:48:10 dillon Exp $
*/
#include "dev/drm/drmP.h"
int ret;
drm_mem_stats_t *stats;
- stats = malloc(sizeof(DRM(mem_stats)), DRM(M_DRM), M_WAITOK);
+ stats = kmalloc(sizeof(DRM(mem_stats)), DRM(M_DRM), M_WAITOK);
DRM_SPINLOCK(&DRM(mem_lock));
bcopy(DRM(mem_stats), stats, sizeof(DRM(mem_stats)));
ret = DRM(_mem_info)(stats, oidp, arg1, arg2, req);
- free(stats, DRM(M_DRM));
+ kfree(stats, DRM(M_DRM));
return ret;
}
#endif /* __FreeBSD__ */
return NULL;
}
- if (!(pt = malloc(size, DRM(M_DRM), M_NOWAIT))) {
+ if (!(pt = kmalloc(size, DRM(M_DRM), M_NOWAIT))) {
DRM_SPINLOCK(&DRM(mem_lock));
++DRM(mem_stats)[area].fail_count;
DRM_SPINUNLOCK(&DRM(mem_lock));
if (!pt)
DRM_MEM_ERROR(area, "Attempt to free NULL pointer\n");
else
- free(pt, DRM(M_DRM));
+ kfree(pt, DRM(M_DRM));
DRM_SPINLOCK(&DRM(mem_lock));
DRM(mem_stats)[area].bytes_freed += size;
free_count = ++DRM(mem_stats)[area].free_count;
/*
* $FreeBSD: src/sys/dev/drm/drm_os_freebsd.h,v 1.10.2.1 2003/04/26 07:05:28 anholt Exp $
- * $DragonFly: src/sys/dev/drm/Attic/drm_os_freebsd.h,v 1.18 2006/07/28 02:17:36 dillon Exp $
+ * $DragonFly: src/sys/dev/drm/Attic/drm_os_freebsd.h,v 1.19 2006/09/05 03:48:10 dillon Exp $
*/
#include <sys/param.h>
#include <sys/queue.h>
#define DRM_TASKQUEUE_ARGS void *arg, int pending
#define DRM_IRQ_ARGS void *arg
#define DRM_DEVICE drm_device_t *dev = kdev->si_drv1
-#define DRM_MALLOC(size) malloc( size, DRM(M_DRM), M_NOWAIT )
-#define DRM_FREE(pt,size) free( pt, DRM(M_DRM) )
+#define DRM_MALLOC(size) kmalloc( size, DRM(M_DRM), M_NOWAIT )
+#define DRM_FREE(pt,size) kfree( pt, DRM(M_DRM) )
#define DRM_VTOPHYS(addr) vtophys(addr)
/* Read/write from bus space, with byteswapping to le if necessary */
* Gareth Hughes <gareth@valinux.com>
*
* $FreeBSD: src/sys/dev/drm/drm_scatter.h,v 1.4.2.1 2003/04/26 07:05:28 anholt Exp $
- * $DragonFly: src/sys/dev/drm/Attic/drm_scatter.h,v 1.3 2005/02/17 13:59:35 joerg Exp $
+ * $DragonFly: src/sys/dev/drm/Attic/drm_scatter.h,v 1.4 2006/09/05 03:48:10 dillon Exp $
*/
#include "dev/drm/drmP.h"
void DRM(sg_cleanup)( drm_sg_mem_t *entry )
{
- free( entry->virtual, DRM(M_DRM) );
+ kfree( entry->virtual, DRM(M_DRM) );
DRM(free)( entry->busaddr,
entry->pages * sizeof(*entry->busaddr),
}
bzero( (void *)entry->busaddr, pages * sizeof(*entry->busaddr) );
- entry->virtual = malloc( pages << PAGE_SHIFT, DRM(M_DRM), M_WAITOK );
+ entry->virtual = kmalloc( pages << PAGE_SHIFT, DRM(M_DRM), M_WAITOK );
if ( !entry->virtual ) {
DRM(free)( entry->busaddr,
entry->pages * sizeof(*entry->busaddr),
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/syscons/scvtb.c,v 1.5.2.1 2001/07/16 05:21:23 yokota Exp $
- * $DragonFly: src/sys/dev/misc/syscons/scvtb.c,v 1.8 2006/09/05 00:55:38 dillon Exp $
+ * $DragonFly: src/sys/dev/misc/syscons/scvtb.c,v 1.9 2006/09/05 03:48:10 dillon Exp $
*/
#include "opt_syscons.h"
case VTB_MEMORY:
case VTB_RINGBUFFER:
if ((buf == NULL) && (cols*rows != 0)) {
- vtb->vtb_buffer = malloc(cols*rows*sizeof(uint16_t),
+ vtb->vtb_buffer = kmalloc(cols*rows*sizeof(uint16_t),
M_SYSCONS,
M_ZERO | ((wait) ? M_WAITOK : M_NOWAIT));
if (vtb->vtb_buffer != NULL) {
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/dev/syscons/syscons.c,v 1.336.2.17 2004/03/25 08:41:09 ru Exp $
- * $DragonFly: src/sys/dev/misc/syscons/syscons.c,v 1.26 2006/09/05 00:55:38 dillon Exp $
+ * $DragonFly: src/sys/dev/misc/syscons/syscons.c,v 1.27 2006/09/05 03:48:10 dillon Exp $
*/
#include "use_splash.h"
if (sc_console->tsw->te_size > 0) {
/* assert(sc_console->ts != NULL); */
kernel_console_ts = sc_console->ts;
- sc_console->ts = malloc(sc_console->tsw->te_size,
+ sc_console->ts = kmalloc(sc_console->tsw->te_size,
M_SYSCONS, M_WAITOK);
bcopy(kernel_console_ts, sc_console->ts, sc_console->tsw->te_size);
(*sc_console->tsw->te_default_attr)(sc_console,
/* $NetBSD: if_de.c,v 1.86 1999/06/01 19:17:59 thorpej Exp $ */
/* $FreeBSD: src/sys/pci/if_de.c,v 1.123.2.4 2000/08/04 23:25:09 peter Exp $ */
-/* $DragonFly: src/sys/dev/netif/de/if_de.c,v 1.44 2006/09/05 00:55:39 dillon Exp $ */
+/* $DragonFly: src/sys/dev/netif/de/if_de.c,v 1.45 2006/09/05 03:48:10 dillon Exp $ */
/*-
* Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com)
tulip_initcsrs(sc, csr_base + csroffset, csrsize);
- sc->tulip_rxdescs = malloc(sizeof(tulip_desc_t) * TULIP_RXDESCS,
+ sc->tulip_rxdescs = kmalloc(sizeof(tulip_desc_t) * TULIP_RXDESCS,
M_DEVBUF, M_INTWAIT);
- sc->tulip_txdescs = malloc(sizeof(tulip_desc_t) * TULIP_TXDESCS,
+ sc->tulip_txdescs = kmalloc(sizeof(tulip_desc_t) * TULIP_TXDESCS,
M_DEVBUF, M_INTWAIT);
tulip_initring(sc, &sc->tulip_rxinfo, sc->tulip_rxdescs, TULIP_RXDESCS);
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $DragonFly: src/sys/dev/netif/em/if_em.c,v 1.48 2006/09/05 00:55:40 dillon Exp $
+ * $DragonFly: src/sys/dev/netif/em/if_em.c,v 1.49 2006/09/05 03:48:10 dillon Exp $
* $FreeBSD$
*/
/*
static int
em_allocate_transmit_structures(struct adapter * adapter)
{
- adapter->tx_buffer_area = malloc(sizeof(struct em_buffer) *
+ adapter->tx_buffer_area = kmalloc(sizeof(struct em_buffer) *
adapter->num_tx_desc, M_DEVBUF, M_NOWAIT | M_ZERO);
if (adapter->tx_buffer_area == NULL) {
device_printf(adapter->dev, "Unable to allocate tx_buffer memory\n");
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/firewire/if_fwe.c,v 1.27 2004/01/08 14:58:09 simokawa Exp $
- * $DragonFly: src/sys/dev/netif/fwe/if_fwe.c,v 1.25 2006/09/05 00:55:40 dillon Exp $
+ * $DragonFly: src/sys/dev/netif/fwe/if_fwe.c,v 1.26 2006/09/05 03:48:10 dillon Exp $
*/
#include "opt_inet.h"
xferq->psize = MCLBYTES;
xferq->queued = 0;
xferq->buf = NULL;
- xferq->bulkxfer = (struct fw_bulkxfer *) malloc(
+ xferq->bulkxfer = (struct fw_bulkxfer *) kmalloc(
sizeof(struct fw_bulkxfer) * xferq->bnchunk,
M_FWE, M_WAITOK);
if (xferq->bulkxfer == NULL) {
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.110.2.30 2003/06/12 16:47:05 mux Exp $
- * $DragonFly: src/sys/dev/netif/fxp/if_fxp.c,v 1.44 2006/09/05 00:55:40 dillon Exp $
+ * $DragonFly: src/sys/dev/netif/fxp/if_fxp.c,v 1.45 2006/09/05 03:48:10 dillon Exp $
*/
/*
CSR_WRITE_4(sc, FXP_CSR_PORT, FXP_PORT_SELECTIVE_RESET);
DELAY(10);
- sc->cbl_base = malloc(sizeof(struct fxp_cb_tx) * FXP_NTXCB,
+ sc->cbl_base = kmalloc(sizeof(struct fxp_cb_tx) * FXP_NTXCB,
M_DEVBUF, M_WAITOK | M_ZERO);
sc->fxp_stats = kmalloc(sizeof(struct fxp_stats), M_DEVBUF,
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/iicbus/if_ic.c,v 1.8 1999/12/29 04:35:39 peter Exp $
- * $DragonFly: src/sys/dev/netif/ic/if_ic.c,v 1.15 2006/09/05 00:55:40 dillon Exp $
+ * $DragonFly: src/sys/dev/netif/ic/if_ic.c,v 1.16 2006/09/05 03:48:10 dillon Exp $
*/
/*
if ((error = iicbus_request_bus(parent, icdev, IIC_WAIT|IIC_INTR)))
return (error);
- sc->ic_obuf = malloc(sc->ic_if.if_mtu + ICHDRLEN,
+ sc->ic_obuf = kmalloc(sc->ic_if.if_mtu + ICHDRLEN,
M_DEVBUF, M_WAITOK);
if (!sc->ic_obuf) {
iicbus_release_bus(parent, icdev);
return ENOBUFS;
}
- sc->ic_ifbuf = malloc(sc->ic_if.if_mtu + ICHDRLEN,
+ sc->ic_ifbuf = kmalloc(sc->ic_if.if_mtu + ICHDRLEN,
M_DEVBUF, M_WAITOK);
if (!sc->ic_ifbuf) {
iicbus_release_bus(parent, icdev);
* THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/usb/if_kue.c,v 1.17.2.9 2003/04/13 02:39:25 murray Exp $
- * $DragonFly: src/sys/dev/netif/kue/if_kue.c,v 1.20 2006/09/05 00:55:40 dillon Exp $
+ * $DragonFly: src/sys/dev/netif/kue/if_kue.c,v 1.21 2006/09/05 03:48:10 dillon Exp $
*/
/*
err = kue_ctl(sc, KUE_CTL_READ, KUE_CMD_GET_ETHER_DESCRIPTOR,
0, (char *)&sc->kue_desc, sizeof(sc->kue_desc));
- sc->kue_mcfilters = malloc(KUE_MCFILTCNT(sc) * ETHER_ADDR_LEN,
+ sc->kue_mcfilters = kmalloc(KUE_MCFILTCNT(sc) * ETHER_ADDR_LEN,
M_USBDEV, M_WAITOK);
ifp = &sc->arpcom.ac_if;
* this gadget.
*
* $FreeBSD: src/sys/pci/if_mn.c,v 1.11.2.3 2001/01/23 12:47:09 phk Exp $
- * $DragonFly: src/sys/dev/netif/mn/if_mn.c,v 1.12 2006/09/05 00:55:40 dillon Exp $
+ * $DragonFly: src/sys/dev/netif/mn/if_mn.c,v 1.13 2006/09/05 03:48:10 dillon Exp $
*/
/*
{
struct schan *sch;
- sch = sc->ch[chan] = (struct schan *)malloc(sizeof *sc->ch[chan],
+ sch = sc->ch[chan] = (struct schan *)kmalloc(sizeof *sc->ch[chan],
M_MN, M_WAITOK | M_ZERO);
sch->sc = sc;
sch->state = DOWN;
* Written by: yen_cw@myson.com.tw available at: http://www.myson.com.tw/
*
* $FreeBSD: src/sys/dev/my/if_my.c,v 1.2.2.4 2002/04/17 02:05:27 julian Exp $
- * $DragonFly: src/sys/dev/netif/my/if_my.c,v 1.24 2005/12/31 14:07:59 sephe Exp $
+ * $DragonFly: src/sys/dev/netif/my/if_my.c,v 1.25 2006/09/05 03:48:10 dillon Exp $
*
* Myson fast ethernet PCI NIC driver
*
sc->my_unit = unit;
- sc->my_ldata_ptr = malloc(sizeof(struct my_list_data) + 8,
+ sc->my_ldata_ptr = kmalloc(sizeof(struct my_list_data) + 8,
M_DEVBUF, M_WAITOK);
if (sc->my_ldata_ptr == NULL) {
printf("my%d: no memory for list buffers!\n", unit);
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/pdq/pdqvar.h,v 1.3.2.1 2002/05/14 21:02:11 gallatin Exp $
- * $DragonFly: src/sys/dev/netif/pdq_layer/Attic/pdqvar.h,v 1.9 2005/05/05 22:57:44 swildner Exp $
+ * $DragonFly: src/sys/dev/netif/pdq_layer/Attic/pdqvar.h,v 1.10 2006/09/05 03:48:10 dillon Exp $
*
*/
#define PDQ_OS_USEC_DELAY(n) DELAY(n)
#define PDQ_OS_MEMZERO(p, n) bzero((caddr_t)(p), (n))
#define PDQ_OS_VA_TO_PA(pdq, p) vtophys(p)
-#define PDQ_OS_MEMALLOC(n) malloc(n, M_DEVBUF, M_WAITOK)
-#define PDQ_OS_MEMFREE(p, n) free((void *) p, M_DEVBUF)
+#define PDQ_OS_MEMALLOC(n) kmalloc(n, M_DEVBUF, M_WAITOK)
+#define PDQ_OS_MEMFREE(p, n) kfree((void *) p, M_DEVBUF)
#if defined(__DragonFly__) || defined(__FreeBSD__)
#define PDQ_OS_MEMALLOC_CONTIG(n) vm_page_alloc_contig(n, 0, 0xffffffff, PAGE_SIZE)
#define PDQ_OS_MEMFREE_CONTIG(p, n) kmem_free(kernel_map, (vm_offset_t) p, n)
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/sbni/if_sbni_pci.c,v 1.6 2002/09/28 20:59:59 phk Exp $
- * $DragonFly: src/sys/dev/netif/sbni/if_sbni_pci.c,v 1.11 2006/09/05 00:55:41 dillon Exp $
+ * $DragonFly: src/sys/dev/netif/sbni/if_sbni_pci.c,v 1.12 2006/09/05 03:48:10 dillon Exp $
*/
if (pci_get_subdevice(dev) == 2) {
ports <<= 1;
- sc->slave_sc = malloc(sizeof(struct sbni_softc),
+ sc->slave_sc = kmalloc(sizeof(struct sbni_softc),
M_DEVBUF, M_INTWAIT | M_ZERO);
device_set_desc(dev, "Granch SBNI12/PCI Dual adapter");
} else {
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/tx/if_tx.c,v 1.61.2.1 2002/10/29 01:43:49 semenu Exp $
- * $DragonFly: src/sys/dev/netif/tx/if_tx.c,v 1.36 2006/09/05 00:55:41 dillon Exp $
+ * $DragonFly: src/sys/dev/netif/tx/if_tx.c,v 1.37 2006/09/05 03:48:10 dillon Exp $
*/
/*
uint16_t sub_vid;
int i;
- sc->tx_flist = malloc(sizeof(struct epic_frag_list)*TX_RING_SIZE,
+ sc->tx_flist = kmalloc(sizeof(struct epic_frag_list)*TX_RING_SIZE,
M_DEVBUF, M_WAITOK | M_ZERO);
- sc->tx_desc = malloc(sizeof(struct epic_tx_desc)*TX_RING_SIZE,
+ sc->tx_desc = kmalloc(sizeof(struct epic_tx_desc)*TX_RING_SIZE,
M_DEVBUF, M_WAITOK | M_ZERO);
- sc->rx_desc = malloc(sizeof(struct epic_rx_desc)*RX_RING_SIZE,
+ sc->rx_desc = kmalloc(sizeof(struct epic_rx_desc)*RX_RING_SIZE,
M_DEVBUF, M_WAITOK | M_ZERO);
/* Bring the chip out of low-power mode. */
/* $OpenBSD: if_txp.c,v 1.48 2001/06/27 06:34:50 kjc Exp $ */
/* $FreeBSD: src/sys/dev/txp/if_txp.c,v 1.4.2.4 2001/12/14 19:50:43 jlemon Exp $ */
-/* $DragonFly: src/sys/dev/netif/txp/if_txp.c,v 1.38 2006/09/05 00:55:41 dillon Exp $ */
+/* $DragonFly: src/sys/dev/netif/txp/if_txp.c,v 1.39 2006/09/05 03:48:11 dillon Exp $ */
/*
* Copyright (c) 2001
struct txp_swdesc *sd;
if (sc->sc_rxbufs[i].rb_sd != NULL)
continue;
- sc->sc_rxbufs[i].rb_sd = malloc(sizeof(struct txp_swdesc),
+ sc->sc_rxbufs[i].rb_sd = kmalloc(sizeof(struct txp_swdesc),
M_DEVBUF, M_WAITOK);
if (sc->sc_rxbufs[i].rb_sd == NULL)
return(ENOBUFS);
rsp = (struct txp_rsp_desc *)(((u_int8_t *)sc->sc_rspring.base) + ridx);
if (id == rsp->rsp_id && rsp->rsp_seq == seq) {
- *rspp = (struct txp_rsp_desc *)malloc(
+ *rspp = (struct txp_rsp_desc *)kmalloc(
sizeof(struct txp_rsp_desc) * (rsp->rsp_numdesc + 1),
M_DEVBUF, M_INTWAIT);
if ((*rspp) == NULL)
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/ida/ida.c,v 1.7.2.3 2001/03/01 01:57:32 ps Exp $
- * $DragonFly: src/sys/dev/raid/ida/ida.c,v 1.12 2006/09/05 00:55:41 dillon Exp $
+ * $DragonFly: src/sys/dev/raid/ida/ida.c,v 1.13 2006/09/05 03:48:11 dillon Exp $
*/
/*
STAILQ_INIT(&ida->qcb_queue);
bioq_init(&ida->bio_queue);
- ida->qcbs = malloc(IDA_QCB_MAX * sizeof(struct ida_qcb),
+ ida->qcbs = kmalloc(IDA_QCB_MAX * sizeof(struct ida_qcb),
M_DEVBUF, M_INTWAIT|M_ZERO);
/*
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/ips/ips.c,v 1.12 2004/05/30 04:01:29 scottl Exp $
- * $DragonFly: src/sys/dev/raid/ips/ips.c,v 1.15 2006/09/05 00:55:42 dillon Exp $
+ * $DragonFly: src/sys/dev/raid/ips/ips.c,v 1.16 2006/09/05 03:48:11 dillon Exp $
*/
#include <dev/raid/ips/ips.h>
int i;
ips_command_t *command;
- sc->commandarray = malloc(sizeof(sc->commandarray[0]) * sc->max_cmds,
+ sc->commandarray = kmalloc(sizeof(sc->commandarray[0]) * sc->max_cmds,
M_IPSBUF, M_INTWAIT | M_ZERO);
SLIST_INIT(&sc->free_cmd_list);
for (i = 0; i < sc->max_cmds; i++) {
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/ips/ips_ioctl.c,v 1.5 2004/05/30 04:01:29 scottl Exp $
- * $DragonFly: src/sys/dev/raid/ips/ips_ioctl.c,v 1.7 2006/09/05 00:55:42 dillon Exp $
+ * $DragonFly: src/sys/dev/raid/ips/ips_ioctl.c,v 1.8 2006/09/05 03:48:11 dillon Exp $
*/
#include <dev/raid/ips/ips.h>
case IPS_USER_CMD:
user_request = (ips_user_request *)addr;
ioctl_cmd = kmalloc(sizeof(ips_ioctl_t), M_IPSBUF, M_WAITOK);
- ioctl_cmd->command_buffer = malloc(sizeof(ips_generic_cmd),
+ ioctl_cmd->command_buffer = kmalloc(sizeof(ips_generic_cmd),
M_IPSBUF, M_WAITOK);
if (copyin(user_request->command_buffer,
ioctl_cmd->command_buffer, sizeof(ips_generic_cmd))) {
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/pst/pst-iop.c,v 1.2.2.1 2002/08/18 12:32:36 sos Exp $
- * $DragonFly: src/sys/dev/raid/pst/pst-iop.c,v 1.8 2006/09/05 00:55:42 dillon Exp $
+ * $DragonFly: src/sys/dev/raid/pst/pst-iop.c,v 1.9 2006/09/05 03:48:11 dillon Exp $
*/
#include <sys/param.h>
}
/* register iop_attach to be run when interrupts are enabled */
- sc->iop_delayed_attach = malloc(sizeof(struct intr_config_hook),
+ sc->iop_delayed_attach = kmalloc(sizeof(struct intr_config_hook),
M_PSTIOP, M_INTWAIT | M_ZERO);
sc->iop_delayed_attach->ich_func = (void *)iop_attach;
sc->iop_delayed_attach->ich_arg = (void *)sc;
contigfree(reply, ALLOCSIZE, M_PSTIOP);
return 0;
}
- sc->lct = malloc(reply->table_size * sizeof(struct i2o_lct_entry),
+ sc->lct = kmalloc(reply->table_size * sizeof(struct i2o_lct_entry),
M_PSTIOP, M_INTWAIT | M_ZERO);
bcopy(&reply->entry[0], sc->lct,
reply->table_size * sizeof(struct i2o_lct_entry));
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/pst/pst-raid.c,v 1.2.2.1 2002/08/18 12:32:36 sos Exp $
- * $DragonFly: src/sys/dev/raid/pst/pst-raid.c,v 1.17 2006/09/05 00:55:42 dillon Exp $
+ * $DragonFly: src/sys/dev/raid/pst/pst-raid.c,v 1.18 2006/09/05 03:48:11 dillon Exp $
*/
#include <sys/param.h>
if (psc->outstanding < (I2O_IOP_OUTBOUND_FRAME_COUNT - 1) &&
(bio = bioq_first(&psc->bio_queue))) {
if ((mfa = iop_get_mfa(psc->iop)) != 0xffffffff) {
- request = malloc(sizeof(struct pst_request),
+ request = kmalloc(sizeof(struct pst_request),
M_PSTRAID, M_INTWAIT | M_ZERO);
psc->outstanding++;
request->psc = psc;
* SUCH DAMAGE.
*
* $FreeBSD$
- * $DragonFly: src/sys/dev/raid/twa/twa.c,v 1.5 2006/09/05 00:55:42 dillon Exp $
+ * $DragonFly: src/sys/dev/raid/twa/twa.c,v 1.6 2006/09/05 03:48:11 dillon Exp $
*/
/*
}
/* Allocate memory for the AEN queue. */
- if ((aen_queue = malloc(sizeof(struct twa_event_packet) * TWA_Q_LENGTH,
+ if ((aen_queue = kmalloc(sizeof(struct twa_event_packet) * TWA_Q_LENGTH,
M_DEVBUF, M_WAITOK)) == NULL) {
/*
* This should not cause us to return error. We will only be
* SUCH DAMAGE.
*
* $FreeBSD$
- * $DragonFly: src/sys/dev/raid/twa/twa_freebsd.c,v 1.11 2006/09/05 00:55:42 dillon Exp $
+ * $DragonFly: src/sys/dev/raid/twa/twa_freebsd.c,v 1.12 2006/09/05 03:48:11 dillon Exp $
*/
/*
struct twa_request *tr;
int i;
- sc->twa_req_buf = malloc(num_reqs * sizeof(struct twa_request),
+ sc->twa_req_buf = kmalloc(num_reqs * sizeof(struct twa_request),
TWA_MALLOC_CLASS, M_INTWAIT);
/* Allocate the bus DMA tag appropriate for PCI. */
*
* $Id: vinum.c,v 1.33 2001/01/09 06:19:15 grog Exp grog $
* $FreeBSD: src/sys/dev/vinum/vinum.c,v 1.38.2.3 2003/01/07 12:14:16 joerg Exp $
- * $DragonFly: src/sys/dev/raid/vinum/vinum.c,v 1.16 2006/09/05 00:55:42 dillon Exp $
+ * $DragonFly: src/sys/dev/raid/vinum/vinum.c,v 1.17 2006/09/05 03:48:11 dillon Exp $
*/
#define STATIC static /* nothing while we're testing XXX */
cp1++;
if (*cp1 != '\0')
*cp1++ = '\0';
- drives = realloc(drives, (unsigned long)((i + 1) * sizeof(char *)),
+ drives = krealloc(drives, (unsigned long)((i + 1) * sizeof(char *)),
M_TEMP, M_WAITOK);
drives[i] = cp2;
}
*
* $Id: vinumext.h,v 1.26 2000/05/16 07:38:08 grog Exp grog $
* $FreeBSD: src/sys/dev/vinum/vinumext.h,v 1.25.2.3 2001/05/11 02:11:06 grog Exp $
- * $DragonFly: src/sys/dev/raid/vinum/vinumext.h,v 1.8 2006/07/28 02:17:38 dillon Exp $
+ * $DragonFly: src/sys/dev/raid/vinum/vinumext.h,v 1.9 2006/09/05 03:48:11 dillon Exp $
*/
/* vinumext.h: external definitions */
void FFree(void *mem, char *, int);
#define LOCKDRIVE(d) lockdrive (d, __FILE__, __LINE__)
#else
-#define Malloc(x) malloc((x), M_DEVBUF, \
+#define Malloc(x) kmalloc((x), M_DEVBUF, \
mycpu->gd_intr_nesting_level == 0? M_WAITOK: M_INTWAIT)
-#define Free(x) free((x), M_DEVBUF)
+#define Free(x) kfree((x), M_DEVBUF)
#define LOCKDRIVE(d) lockdrive (d)
#endif
#else
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/digi/digi.c,v 1.36 2003/09/26 09:05:57 phk Exp $
- * $DragonFly: src/sys/dev/serial/digi/digi.c,v 1.6 2006/09/05 00:55:42 dillon Exp $
+ * $DragonFly: src/sys/dev/serial/digi/digi.c,v 1.7 2006/09/05 03:48:11 dillon Exp $
*/
/*-
if (sc->ports)
kfree(sc->ports, M_TTYS);
- sc->ports = malloc(sizeof(struct digi_p) * sc->numports,
+ sc->ports = kmalloc(sizeof(struct digi_p) * sc->numports,
M_TTYS, M_WAITOK | M_ZERO);
if (sc->ttys)
kfree(sc->ttys, M_TTYS);
- sc->ttys = malloc(sizeof(struct tty) * sc->numports,
+ sc->ttys = kmalloc(sizeof(struct tty) * sc->numports,
M_TTYS, M_WAITOK | M_ZERO);
/*
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/rp/rp.c,v 1.45.2.2 2002/11/07 22:26:59 tegge Exp $
- * $DragonFly: src/sys/dev/serial/rp/rp.c,v 1.17 2006/09/05 00:55:42 dillon Exp $
+ * $DragonFly: src/sys/dev/serial/rp/rp.c,v 1.18 2006/09/05 03:48:11 dillon Exp $
*/
/*
RocketPortVersion, num_ports);
rp_num_ports[unit] = num_ports;
- ctlp->rp = rp = malloc(sizeof(struct rp_port) * num_ports,
+ ctlp->rp = rp = kmalloc(sizeof(struct rp_port) * num_ports,
M_TTYS, M_WAITOK | M_ZERO);
count = unit * 32; /* board times max ports per card SG */
for(i=count;i < (count + rp_num_ports[unit]);i++)
minor_to_unit[i] = unit;
- ctlp->tty = tty = malloc(sizeof(struct tty) * num_ports,
+ ctlp->tty = tty = kmalloc(sizeof(struct tty) * num_ports,
M_TTYS, M_WAITOK | M_ZERO);
crit_enter();
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/rp/rp_isa.c,v 1.3.2.1 2002/06/18 03:11:46 obrien Exp $
- * $DragonFly: src/sys/dev/serial/rp/rp_isa.c,v 1.5 2006/09/05 00:55:42 dillon Exp $
+ * $DragonFly: src/sys/dev/serial/rp/rp_isa.c,v 1.6 2006/09/05 03:48:11 dillon Exp $
*/
#include <sys/param.h>
/* The IO ports of AIOPs for an ISA controller are discrete. */
ctlp->io_num = 1;
- ctlp->io_rid = malloc(sizeof(*(ctlp->io_rid)) * MAX_AIOPS_PER_BOARD,
+ ctlp->io_rid = kmalloc(sizeof(*(ctlp->io_rid)) * MAX_AIOPS_PER_BOARD,
M_DEVBUF, M_WAITOK | M_ZERO);
- ctlp->io = malloc(sizeof(*(ctlp->io)) * MAX_AIOPS_PER_BOARD,
+ ctlp->io = kmalloc(sizeof(*(ctlp->io)) * MAX_AIOPS_PER_BOARD,
M_DEVBUF, M_WAITOK | M_ZERO);
- ctlp->bus_ctlp = malloc(sizeof(ISACONTROLLER_t) * 1,
+ ctlp->bus_ctlp = kmalloc(sizeof(ISACONTROLLER_t) * 1,
M_DEVBUF, M_WAITOK | M_ZERO);
ctlp->io_rid[0] = 0;
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/rp/rp_pci.c,v 1.3.2.1 2002/06/18 03:11:46 obrien Exp $
- * $DragonFly: src/sys/dev/serial/rp/rp_pci.c,v 1.6 2006/09/05 00:55:42 dillon Exp $
+ * $DragonFly: src/sys/dev/serial/rp/rp_pci.c,v 1.7 2006/09/05 03:48:11 dillon Exp $
*/
#include <sys/param.h>
/* The IO ports of AIOPs for a PCI controller are continuous. */
ctlp->io_num = 1;
- ctlp->io_rid = malloc(sizeof(*(ctlp->io_rid)) * ctlp->io_num,
+ ctlp->io_rid = kmalloc(sizeof(*(ctlp->io_rid)) * ctlp->io_num,
M_DEVBUF, M_WAITOK | M_ZERO);
- ctlp->io = malloc(sizeof(*(ctlp->io)) * ctlp->io_num,
+ ctlp->io = kmalloc(sizeof(*(ctlp->io)) * ctlp->io_num,
M_DEVBUF, M_WAITOK | M_ZERO);
ctlp->bus_ctlp = NULL;
* NO EVENT SHALL THE AUTHORS BE LIABLE.
*
* $FreeBSD: src/sys/dev/si/si.c,v 1.101.2.1 2001/02/26 04:23:06 jlemon Exp $
- * $DragonFly: src/sys/dev/serial/si/si.c,v 1.18 2006/09/05 00:55:42 dillon Exp $
+ * $DragonFly: src/sys/dev/serial/si/si.c,v 1.19 2006/09/05 03:48:11 dillon Exp $
*/
#ifndef lint
modp = (struct si_module *)
(maddr + (unsigned)(modp->sm_next & 0x7fff));
}
- sc->sc_ports = malloc(sizeof(struct si_port) * nport,
+ sc->sc_ports = kmalloc(sizeof(struct si_port) * nport,
M_DEVBUF, M_WAITOK | M_ZERO);
sc->sc_nport = nport;
for (n = 0; n < nport; ++n) {
* $NetBSD: ugen.c,v 1.27 1999/10/28 12:08:38 augustss Exp $
* $NetBSD: ugen.c,v 1.59 2002/07/11 21:14:28 augustss Exp $
* $FreeBSD: src/sys/dev/usb/ugen.c,v 1.81 2003/11/09 09:17:22 tanimura Exp $
- * $DragonFly: src/sys/dev/usbmisc/ugen/ugen.c,v 1.19 2006/09/05 00:55:43 dillon Exp $
+ * $DragonFly: src/sys/dev/usbmisc/ugen/ugen.c,v 1.20 2006/09/05 03:48:11 dillon Exp $
*/
/*
isize = UGETW(edesc->wMaxPacketSize);
if (isize == 0) /* shouldn't happen */
return (EINVAL);
- sce->ibuf = malloc(isize * UGEN_NISOFRAMES,
+ sce->ibuf = kmalloc(isize * UGEN_NISOFRAMES,
M_USBDEV, M_WAITOK);
sce->cur = sce->fill = sce->ibuf;
sce->limit = sce->ibuf + isize * UGEN_NISOFRAMES;
/*
* $FreeBSD: src/sys/dev/usb/ums.c,v 1.64 2003/11/09 09:17:22 tanimura Exp $
- * $DragonFly: src/sys/dev/usbmisc/ums/ums.c,v 1.18 2006/09/05 00:55:44 dillon Exp $
+ * $DragonFly: src/sys/dev/usbmisc/ums/ums.c,v 1.19 2006/09/05 03:48:11 dillon Exp $
*/
/*
hid_input, &loc_btn, 0))
break;
sc->nbuttons = i - 1;
- sc->sc_loc_btn = malloc(sizeof(struct hid_location)*sc->nbuttons,
+ sc->sc_loc_btn = kmalloc(sizeof(struct hid_location)*sc->nbuttons,
M_USBDEV, M_INTWAIT);
printf("%s: %d buttons%s\n", USBDEVNAME(sc->sc_dev),
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/fb/splash.c,v 1.8 2000/01/29 14:42:57 peter Exp $
- * $DragonFly: src/sys/dev/video/fb/splash.c,v 1.4 2006/09/05 00:55:44 dillon Exp $
+ * $DragonFly: src/sys/dev/video/fb/splash.c,v 1.5 2006/09/05 03:48:11 dillon Exp $
*/
#include <sys/param.h>
break;
}
if ((i >= decoders) && (decoders % DECODER_ARRAY_DELTA) == 0) {
- p = malloc(sizeof(*p)*(decoders + DECODER_ARRAY_DELTA),
+ p = kmalloc(sizeof(*p)*(decoders + DECODER_ARRAY_DELTA),
M_DEVBUF, M_NOWAIT);
if (p == NULL)
return ENOMEM;
* from: svr4_util.h,v 1.5 1994/11/18 02:54:31 christos Exp
* from: linux_util.h,v 1.2 1995/03/05 23:23:50 fvdl Exp
* $FreeBSD: src/sys/compat/linux/linux_util.h,v 1.12.2.2 2000/11/02 23:31:28 obrien Exp $
- * $DragonFly: src/sys/emulation/linux/linux_util.h,v 1.9 2006/06/05 07:26:09 dillon Exp $
+ * $DragonFly: src/sys/emulation/linux/linux_util.h,v 1.10 2006/09/05 03:48:11 dillon Exp $
*/
/*
static __inline void
linux_free_path(char **kname) {
if (*kname) {
- free(*kname, M_TEMP);
+ kfree(*kname, M_TEMP);
*kname = NULL;
}
}
* THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/sys/compat/ndis/kern_ndis.c,v 1.57 2004/07/11 00:19:30 wpaul Exp $
- * $DragonFly: src/sys/emulation/ndis/kern_ndis.c,v 1.11 2006/09/05 00:55:45 dillon Exp $
+ * $DragonFly: src/sys/emulation/ndis/kern_ndis.c,v 1.12 2006/09/05 03:48:11 dillon Exp $
*/
#include <sys/param.h>
SLIST_INIT(&brl_rev);
- rl = malloc(sizeof(ndis_resource_list) +
+ rl = kmalloc(sizeof(ndis_resource_list) +
(sizeof(cm_partial_resource_desc) * (sc->ndis_rescnt - 1)),
M_DEVBUF, M_WAITOK|M_NULLOK|M_ZERO);
* temporary list with the entries in reverse order.
*/
SLIST_FOREACH(brle, brl, link) {
- n = malloc(sizeof(struct resource_list_entry),
+ n = kmalloc(sizeof(struct resource_list_entry),
M_TEMP, M_WAITOK|M_NULLOK);
if (n == NULL) {
error = ENOMEM;
sc = arg;
- sc->ndis_tmaps = malloc(sizeof(bus_dmamap_t) * sc->ndis_maxpkts,
+ sc->ndis_tmaps = kmalloc(sizeof(bus_dmamap_t) * sc->ndis_maxpkts,
M_DEVBUF, M_WAITOK|M_ZERO);
for (i = 0; i < sc->ndis_maxpkts; i++) {
* THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.62 2004/07/11 00:19:30 wpaul Exp $
- * $DragonFly: src/sys/emulation/ndis/subr_ndis.c,v 1.15 2006/09/05 00:55:45 dillon Exp $
+ * $DragonFly: src/sys/emulation/ndis/subr_ndis.c,v 1.16 2006/09/05 03:48:11 dillon Exp $
*/
/*
block = (ndis_miniport_block *)adapter;
sc = (struct ndis_softc *)block->nmb_ifp;
- sc->ndis_mmaps = malloc(sizeof(bus_dmamap_t) * physmapneeded,
+ sc->ndis_mmaps = kmalloc(sizeof(bus_dmamap_t) * physmapneeded,
M_DEVBUF, M_INTWAIT|M_ZERO);
if (sc->ndis_mmaps == NULL)
ndis_packet *cur;
int i;
- *pool = malloc(sizeof(ndis_packet) *
+ *pool = kmalloc(sizeof(ndis_packet) *
((descnum + NDIS_POOL_EXTRA) + 1),
M_DEVBUF, M_WAITOK|M_ZERO);
cur = (ndis_packet *)*pool;
ndis_buffer *cur;
int i;
- *pool = malloc(sizeof(ndis_buffer) *
+ *pool = kmalloc(sizeof(ndis_buffer) *
((descnum + NDIS_POOL_EXTRA) + 1),
M_DEVBUF, M_WAITOK|M_ZERO);
cur = (ndis_buffer *)*pool;
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/posix4/posix4.h,v 1.6 1999/12/27 10:22:09 bde Exp $
- * $DragonFly: src/sys/emulation/posix4/Attic/posix4.h,v 1.5 2003/11/27 19:11:17 dillon Exp $
+ * $DragonFly: src/sys/emulation/posix4/Attic/posix4.h,v 1.6 2006/09/05 03:48:11 dillon Exp $
*/
#include "opt_posix.h"
MALLOC_DECLARE(M_P31B);
-#define p31b_malloc(SIZE) malloc((SIZE), M_P31B, M_WAITOK)
-#define p31b_free(P) free((P), M_P31B)
+#define p31b_malloc(SIZE) kmalloc((SIZE), M_P31B, M_WAITOK)
+#define p31b_free(P) kfree((P), M_P31B)
struct proc;
# as much of the source tree as it can.
#
# $FreeBSD: src/sys/i386/conf/LINT,v 1.749.2.144 2003/06/04 17:56:59 sam Exp $
-# $DragonFly: src/sys/i386/conf/Attic/LINT,v 1.91 2006/09/03 09:07:20 sephe Exp $
+# $DragonFly: src/sys/i386/conf/Attic/LINT,v 1.92 2006/09/05 03:48:11 dillon Exp $
#
# NB: You probably don't want to try running a kernel built from this
# file. Instead, you should start from GENERIC, and add options from
#makeoptions INSTALLSTRIPPED=1
#makeoptions INSTALLSTRIPPEDMODULES=1
+options KMALLOC_ONLY
+
#
# Certain applications can grow to be larger than the 128M limit
# that FreeBSD initially imposes. Below are some options to
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.16.2.2 2003/01/23 00:55:27 scottl Exp $
- * $DragonFly: src/sys/i386/i386/Attic/busdma_machdep.c,v 1.14 2006/09/05 00:55:45 dillon Exp $
+ * $DragonFly: src/sys/i386/i386/Attic/busdma_machdep.c,v 1.15 2006/09/05 03:48:11 dillon Exp $
*/
#include <sys/param.h>
if (dmat->segments == NULL) {
KKASSERT(dmat->nsegments && dmat->nsegments < 16384);
- dmat->segments = malloc(sizeof(bus_dma_segment_t) *
+ dmat->segments = kmalloc(sizeof(bus_dma_segment_t) *
dmat->nsegments, M_DEVBUF, M_INTWAIT);
}
if (dmat->segments == NULL) {
KKASSERT(dmat->nsegments < 16384);
- dmat->segments = malloc(sizeof(bus_dma_segment_t) *
+ dmat->segments = kmalloc(sizeof(bus_dma_segment_t) *
dmat->nsegments, M_DEVBUF, M_INTWAIT);
}
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/i386/i386/i686_mem.c,v 1.8.2.4 2002/09/24 08:12:51 mdodd Exp $
- * $DragonFly: src/sys/i386/i386/Attic/i686_mem.c,v 1.4 2005/08/29 21:08:02 dillon Exp $
+ * $DragonFly: src/sys/i386/i386/Attic/i686_mem.c,v 1.5 2006/09/05 03:48:11 dillon Exp $
*/
#include <sys/param.h>
}
sc->mr_desc =
- (struct mem_range_desc *)malloc(nmdesc * sizeof(struct mem_range_desc),
+ (struct mem_range_desc *)kmalloc(nmdesc * sizeof(struct mem_range_desc),
M_MEMDESC, M_WAITOK);
bzero(sc->mr_desc, nmdesc * sizeof(struct mem_range_desc));
sc->mr_ndesc = nmdesc;
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/i386/i386/k6_mem.c,v 1.4.2.2 2002/09/16 21:58:41 dwmalone Exp $
- * $DragonFly: src/sys/i386/i386/Attic/k6_mem.c,v 1.5 2005/01/06 08:33:11 asmodai Exp $
+ * $DragonFly: src/sys/i386/i386/Attic/k6_mem.c,v 1.6 2006/09/05 03:48:11 dillon Exp $
*
*/
sc->mr_cap = 0;
sc->mr_ndesc = 2; /* XXX (BFF) For now, we only have one msr for this */
- sc->mr_desc = malloc(sc->mr_ndesc * sizeof(struct mem_range_desc),
+ sc->mr_desc = kmalloc(sc->mr_ndesc * sizeof(struct mem_range_desc),
M_MEMDESC, M_WAITOK);
if (sc->mr_desc == NULL)
panic("k6_mrinit: malloc returns NULL");
* from: Utah $Hdr: mem.c 1.13 89/10/08$
* from: @(#)mem.c 7.2 (Berkeley) 5/9/91
* $FreeBSD: src/sys/i386/i386/mem.c,v 1.79.2.9 2003/01/04 22:58:01 njl Exp $
- * $DragonFly: src/sys/i386/i386/Attic/mem.c,v 1.18 2006/09/05 00:55:45 dillon Exp $
+ * $DragonFly: src/sys/i386/i386/Attic/mem.c,v 1.19 2006/09/05 03:48:11 dillon Exp $
*/
/*
nd = imin(mo->mo_arg[0], mem_range_softc.mr_ndesc);
if (nd > 0) {
md = (struct mem_range_desc *)
- malloc(nd * sizeof(struct mem_range_desc),
+ kmalloc(nd * sizeof(struct mem_range_desc),
M_MEMDESC, M_WAITOK);
error = mem_range_attr_get(md, &nd);
if (!error)
break;
case MEMRANGE_SET:
- md = (struct mem_range_desc *)malloc(sizeof(struct mem_range_desc),
+ md = (struct mem_range_desc *)kmalloc(sizeof(struct mem_range_desc),
M_MEMDESC, M_WAITOK);
error = copyin(mo->mo_desc, md, sizeof(struct mem_range_desc));
/* clamp description string */
*
* @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94
* $FreeBSD: src/sys/kern/kern_descrip.c,v 1.81.2.19 2004/02/28 00:43:31 tegge Exp $
- * $DragonFly: src/sys/kern/kern_descrip.c,v 1.72 2006/09/05 00:55:45 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_descrip.c,v 1.73 2006/09/05 03:48:12 dillon Exp $
*/
#include "opt_compat.h"
ni = (i - 1) / 2;
}
spin_unlock_rd(&fdp->fd_spin);
- newfdp->fd_files = malloc(i * sizeof(struct fdnode),
+ newfdp->fd_files = kmalloc(i * sizeof(struct fdnode),
M_FILEDESC, M_WAITOK | M_ZERO);
/*
{
struct filedesc_to_leader *fdtol;
- fdtol = malloc(sizeof(struct filedesc_to_leader),
+ fdtol = kmalloc(sizeof(struct filedesc_to_leader),
M_FILEDESC_TO_LEADER, M_WAITOK);
fdtol->fdl_refcount = 1;
fdtol->fdl_holdcount = 0;
* SUCH DAMAGE.
*/
/*
- * $DragonFly: src/sys/kern/kern_ktr.c,v 1.16 2006/05/29 07:18:04 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_ktr.c,v 1.17 2006/09/05 03:48:12 dillon Exp $
*/
/*
* Kernel tracepoint facility.
int i;
for(i = 1; i < ncpus; ++i) {
- ktr_buf[i] = malloc(KTR_ENTRIES * sizeof(struct ktr_entry),
+ ktr_buf[i] = kmalloc(KTR_ENTRIES * sizeof(struct ktr_entry),
M_KTR, M_WAITOK | M_ZERO);
}
}
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/kern/kern_linker.c,v 1.41.2.3 2001/11/21 17:50:35 luigi Exp $
- * $DragonFly: src/sys/kern/kern_linker.c,v 1.29 2006/09/05 00:55:45 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_linker.c,v 1.30 2006/09/05 03:48:12 dillon Exp $
*/
#include "opt_ddb.h"
{
linker_file_t* newdeps;
- newdeps = malloc((file->ndeps + 1) * sizeof(linker_file_t*),
+ newdeps = kmalloc((file->ndeps + 1) * sizeof(linker_file_t*),
M_LINKER, M_WAITOK);
if (newdeps == NULL)
return ENOMEM;
* Round the symbol size up to align.
*/
common_size = (common_size + sizeof(int) - 1) & -sizeof(int);
- cp = malloc(sizeof(struct common_symbol)
+ cp = kmalloc(sizeof(struct common_symbol)
+ common_size
+ strlen(name) + 1,
M_LINKER, M_WAITOK);
* from: Utah $Hdr: mem.c 1.13 89/10/08$
* from: @(#)mem.c 7.2 (Berkeley) 5/9/91
* $FreeBSD: src/sys/i386/i386/mem.c,v 1.79.2.9 2003/01/04 22:58:01 njl Exp $
- * $DragonFly: src/sys/kern/kern_memio.c,v 1.18 2006/09/05 00:55:45 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_memio.c,v 1.19 2006/09/05 03:48:11 dillon Exp $
*/
/*
nd = imin(mo->mo_arg[0], mem_range_softc.mr_ndesc);
if (nd > 0) {
md = (struct mem_range_desc *)
- malloc(nd * sizeof(struct mem_range_desc),
+ kmalloc(nd * sizeof(struct mem_range_desc),
M_MEMDESC, M_WAITOK);
error = mem_range_attr_get(md, &nd);
if (!error)
break;
case MEMRANGE_SET:
- md = (struct mem_range_desc *)malloc(sizeof(struct mem_range_desc),
+ md = (struct mem_range_desc *)kmalloc(sizeof(struct mem_range_desc),
M_MEMDESC, M_WAITOK);
error = copyin(mo->mo_desc, md, sizeof(struct mem_range_desc));
/* clamp description string */
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/kern/kern_module.c,v 1.21 1999/11/08 06:53:30 peter Exp $
- * $DragonFly: src/sys/kern/kern_module.c,v 1.11 2006/09/05 00:55:45 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_module.c,v 1.12 2006/09/05 03:48:12 dillon Exp $
*/
#include <sys/param.h>
return EEXIST;
}
namelen = strlen(data->name) + 1;
- newmod = (module_t) malloc(sizeof(struct module) + namelen,
+ newmod = (module_t) kmalloc(sizeof(struct module) + namelen,
M_MODULE, M_WAITOK);
if (newmod == 0)
return ENOMEM;
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $DragonFly: src/sys/kern/kern_objcache.c,v 1.10 2006/09/05 00:55:45 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_objcache.c,v 1.11 2006/09/05 03:48:12 dillon Exp $
*/
#include <sys/param.h>
{
struct magazine *mag;
- mag = malloc(__offsetof(struct magazine, objects[capacity]),
+ mag = kmalloc(__offsetof(struct magazine, objects[capacity]),
M_OBJMAG, M_INTWAIT | M_ZERO);
mag->capacity = capacity;
mag->rounds = 0;
int cpuid;
/* allocate object cache structure */
- oc = malloc(__offsetof(struct objcache, cache_percpu[ncpus]),
+ oc = kmalloc(__offsetof(struct objcache, cache_percpu[ncpus]),
M_OBJCACHE, M_WAITOK | M_ZERO);
oc->name = kstrdup(name, M_TEMP);
oc->ctor = ctor;
*
* @(#)kern_synch.c 8.9 (Berkeley) 5/19/95
* $FreeBSD: src/sys/kern/kern_synch.c,v 1.87.2.6 2002/10/13 07:29:53 kbyanc Exp $
- * $DragonFly: src/sys/kern/kern_synch.c,v 1.66 2006/09/03 18:52:28 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_synch.c,v 1.67 2006/09/05 03:48:12 dillon Exp $
*/
#include "opt_ktrace.h"
gd->gd_tsleep_hash = slpque_cpu0;
} else {
- gd->gd_tsleep_hash = malloc(sizeof(slpque_cpu0),
+ gd->gd_tsleep_hash = kmalloc(sizeof(slpque_cpu0),
M_TSLEEP, M_WAITOK | M_ZERO);
}
for (i = 0; i < TABLESIZE; ++i)
*
* From: @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
* $FreeBSD: src/sys/kern/kern_timeout.c,v 1.59.2.1 2001/11/13 18:24:52 archie Exp $
- * $DragonFly: src/sys/kern/kern_timeout.c,v 1.21 2005/12/20 19:09:33 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_timeout.c,v 1.22 2006/09/05 03:48:12 dillon Exp $
*/
/*
* DRAGONFLY BGL STATUS
sc = &softclock_pcpu_ary[cpu];
- sc->callwheel = malloc(sizeof(*sc->callwheel) * callwheelsize,
+ sc->callwheel = kmalloc(sizeof(*sc->callwheel) * callwheelsize,
M_CALLOUT, M_WAITOK|M_ZERO);
for (i = 0; i < callwheelsize; ++i)
TAILQ_INIT(&sc->callwheel[i]);
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/kern/link_aout.c,v 1.26 1999/12/24 15:33:36 bde Exp $
- * $DragonFly: src/sys/kern/link_aout.c,v 1.19 2006/09/05 00:55:45 dillon Exp $
+ * $DragonFly: src/sys/kern/link_aout.c,v 1.20 2006/09/05 03:48:12 dillon Exp $
*/
#define FREEBSD_AOUT 1
*/
af = kmalloc(sizeof(struct aout_file), M_LINKER, M_WAITOK);
bzero(af, sizeof(*af));
- af->address = malloc(header.a_text + header.a_data + header.a_bss,
+ af->address = kmalloc(header.a_text + header.a_data + header.a_bss,
M_LINKER, M_WAITOK);
/*
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $DragonFly: src/sys/kern/lwkt_caps.c,v 1.8 2006/09/05 00:55:45 dillon Exp $
+ * $DragonFly: src/sys/kern/lwkt_caps.c,v 1.9 2006/09/05 03:48:12 dillon Exp $
*/
/*
caps_kinfo_t caps;
caps_kinfo_t ctmp;
- caps = malloc(offsetof(struct caps_kinfo, ci_name[len+1]),
+ caps = kmalloc(offsetof(struct caps_kinfo, ci_name[len+1]),
M_CAPS, M_WAITOK|M_ZERO);
TAILQ_INIT(&caps->ci_msgpendq);
TAILQ_INIT(&caps->ci_msguserq);
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/kern/subr_bus.c,v 1.54.2.9 2002/10/10 15:13:32 jhb Exp $
- * $DragonFly: src/sys/kern/subr_bus.c,v 1.30 2006/09/05 00:55:45 dillon Exp $
+ * $DragonFly: src/sys/kern/subr_bus.c,v 1.31 2006/09/05 03:48:12 dillon Exp $
*/
#include "opt_bus.h"
if (create && !dc) {
PDEBUG(("creating %s", classname));
- dc = malloc(sizeof(struct devclass) + strlen(classname) + 1,
+ dc = kmalloc(sizeof(struct devclass) + strlen(classname) + 1,
M_BUS, M_INTWAIT | M_ZERO);
if (!dc)
return(NULL);
if (res->u.stringval)
kfree(res->u.stringval, M_TEMP);
stringval = cfgres[j].u.stringval;
- res->u.stringval = malloc(strlen(stringval) + 1,
+ res->u.stringval = kmalloc(strlen(stringval) + 1,
M_TEMP, M_INTWAIT);
if (res->u.stringval == NULL)
break;
* from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91
* from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $
* $FreeBSD: src/sys/kern/subr_diskslice.c,v 1.82.2.6 2001/07/24 09:49:41 dd Exp $
- * $DragonFly: src/sys/kern/subr_diskslice.c,v 1.22 2006/09/05 00:55:45 dillon Exp $
+ * $DragonFly: src/sys/kern/subr_diskslice.c,v 1.23 2006/09/05 03:48:12 dillon Exp $
*/
#include <sys/param.h>
struct diskslice *sp;
struct diskslices *ssp;
- ssp = malloc(offsetof(struct diskslices, dss_slices) +
+ ssp = kmalloc(offsetof(struct diskslices, dss_slices) +
nslices * sizeof *sp, M_DEVBUF, M_WAITOK);
ssp->dss_first_bsd_slice = COMPATIBILITY_SLICE;
ssp->dss_nslices = nslices;
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/kern/subr_eventhandler.c,v 1.3 1999/11/16 16:28:57 phk Exp $
- * $DragonFly: src/sys/kern/subr_eventhandler.c,v 1.4 2006/09/05 00:55:45 dillon Exp $
+ * $DragonFly: src/sys/kern/subr_eventhandler.c,v 1.5 2006/09/05 03:48:12 dillon Exp $
*/
#include <sys/param.h>
/* Do we need to create the list? */
if (list == NULL) {
- list = malloc(sizeof(struct eventhandler_list) + strlen(name) + 1,
+ list = kmalloc(sizeof(struct eventhandler_list) + strlen(name) + 1,
M_EVENTHANDLER, M_INTWAIT);
list->el_flags = 0;
list->el_name = (char *)list + sizeof(struct eventhandler_list);
}
/* allocate an entry for this handler, populate it */
- eg = malloc(sizeof(struct eventhandler_entry_generic),
+ eg = kmalloc(sizeof(struct eventhandler_entry_generic),
M_EVENTHANDLER, M_INTWAIT);
eg->func = func;
eg->ee.ee_arg = arg;
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/kern/subr_rman.c,v 1.10.2.1 2001/06/05 08:06:08 imp Exp $
- * $DragonFly: src/sys/kern/subr_rman.c,v 1.8 2006/09/05 00:55:45 dillon Exp $
+ * $DragonFly: src/sys/kern/subr_rman.c,v 1.9 2006/09/05 03:48:12 dillon Exp $
*/
/*
rv->r_dev = dev;
rv->r_rm = rm;
if (s->r_sharehead == 0) {
- s->r_sharehead = malloc(sizeof *s->r_sharehead,
+ s->r_sharehead = kmalloc(sizeof *s->r_sharehead,
M_RMAN, M_NOWAIT);
if (s->r_sharehead == 0) {
kfree(rv, M_RMAN);
*
* @(#)vfs_cluster.c 8.7 (Berkeley) 2/13/94
* $FreeBSD: src/sys/kern/vfs_cluster.c,v 1.92.2.9 2001/11/18 07:10:59 dillon Exp $
- * $DragonFly: src/sys/kern/vfs_cluster.c,v 1.27 2006/09/05 00:55:45 dillon Exp $
+ * $DragonFly: src/sys/kern/vfs_cluster.c,v 1.28 2006/09/05 03:48:12 dillon Exp $
*/
#include "opt_debug_cluster.h"
int i, len;
len = (int)(vp->v_lastw - vp->v_cstart + lblocksize) / lblocksize;
- buflist = malloc(sizeof(struct buf *) * (len + 1) + sizeof(*buflist),
+ buflist = kmalloc(sizeof(struct buf *) * (len + 1) + sizeof(*buflist),
M_SEGMENT, M_WAITOK);
buflist->bs_nchildren = 0;
buflist->bs_children = (struct buf **) (buflist + 1);
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $DragonFly: src/sys/kern/vfs_jops.c,v 1.29 2006/09/05 00:55:45 dillon Exp $
+ * $DragonFly: src/sys/kern/vfs_jops.c,v 1.30 2006/09/05 03:48:12 dillon Exp $
*/
/*
* Each mount point may have zero or more independantly configured journals
uio_one_iovec = ap->a_uio->uio_iov[0];
uio_copy.uio_iov = &uio_one_iovec;
} else {
- uio_copy.uio_iov = malloc(uio_copy.uio_iovcnt * sizeof(struct iovec),
+ uio_copy.uio_iov = kmalloc(uio_copy.uio_iovcnt * sizeof(struct iovec),
M_JOURNAL, M_WAITOK);
bcopy(ap->a_uio->uio_iov, uio_copy.uio_iov,
uio_copy.uio_iovcnt * sizeof(struct iovec));
* $OpenBSD: if_bridge.c,v 1.60 2001/06/15 03:38:33 itojun Exp $
* $NetBSD: if_bridge.c,v 1.31 2005/06/01 19:45:34 jdc Exp $
* $FreeBSD: src/sys/net/if_bridge.c,v 1.26 2005/10/13 23:05:55 thompsa Exp $
- * $DragonFly: src/sys/net/bridge/if_bridge.c,v 1.9 2006/09/05 00:55:47 dillon Exp $
+ * $DragonFly: src/sys/net/bridge/if_bridge.c,v 1.10 2006/09/05 03:48:12 dillon Exp $
*/
/*
{
int i;
- sc->sc_rthash = malloc(sizeof(*sc->sc_rthash) * BRIDGE_RTHASH_SIZE,
+ sc->sc_rthash = kmalloc(sizeof(*sc->sc_rthash) * BRIDGE_RTHASH_SIZE,
M_DEVBUF, M_WAITOK);
for (i = 0; i < BRIDGE_RTHASH_SIZE; i++)
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/netinet/ip_dummynet.c,v 1.24.2.22 2003/05/13 09:31:06 maxim Exp $
- * $DragonFly: src/sys/net/dummynet/ip_dummynet.c,v 1.20 2006/09/05 00:55:47 dillon Exp $
+ * $DragonFly: src/sys/net/dummynet/ip_dummynet.c,v 1.21 2006/09/05 03:48:12 dillon Exp $
*/
#if !defined(KLD_MODULE)
return EINVAL;
}
x->lookup_depth = red_lookup_depth;
- x->w_q_lookup = malloc(x->lookup_depth * sizeof(int),
+ x->w_q_lookup = kmalloc(x->lookup_depth * sizeof(int),
M_DUMMYNET, M_WAITOK);
/* fill the lookup table with (1 - w_q)^x */
x->rq_size = l;
} else /* one is enough for null mask */
x->rq_size = 1;
- x->rq = malloc((1 + x->rq_size) * sizeof(struct dn_flow_queue *),
+ x->rq = kmalloc((1 + x->rq_size) * sizeof(struct dn_flow_queue *),
M_DUMMYNET, M_WAITOK | M_ZERO);
x->rq_elements = 0;
return 0 ;
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/net/if_ef.c,v 1.2.2.4 2001/02/22 09:27:04 bp Exp $
- * $DragonFly: src/sys/net/ef/if_ef.c,v 1.19 2006/09/05 00:55:47 dillon Exp $
+ * $DragonFly: src/sys/net/ef/if_ef.c,v 1.20 2006/09/05 03:48:12 dillon Exp $
*/
#include "opt_inet.h"
TAILQ_FOREACH(ifp, &ifnet, if_link) {
if (ifp->if_type != IFT_ETHER) continue;
EFDEBUG("Found interface %s\n", ifp->if_xname);
- efl = (struct ef_link*)malloc(sizeof(struct ef_link),
+ efl = (struct ef_link*)kmalloc(sizeof(struct ef_link),
M_IFADDR, M_WAITOK);
if (efl == NULL) {
error = ENOMEM;
* --------------------------------------------
*
* $FreeBSD: src/sys/i4b/layer4/i4b_i4bdrv.c,v 1.11.2.5 2001/12/16 15:12:59 hm Exp $
- * $DragonFly: src/sys/net/i4b/layer4/i4b_i4bdrv.c,v 1.16 2006/09/05 00:55:47 dillon Exp $
+ * $DragonFly: src/sys/net/i4b/layer4/i4b_i4bdrv.c,v 1.17 2006/09/05 03:48:12 dillon Exp $
*
* last edit-date: [Sat Aug 11 18:08:10 2001]
*
goto download_done;
}
- prots = malloc(r->numprotos * sizeof(struct isdn_dr_prot),
+ prots = kmalloc(r->numprotos * sizeof(struct isdn_dr_prot),
M_DEVBUF, M_WAITOK);
- prots2 = malloc(r->numprotos * sizeof(struct isdn_dr_prot),
+ prots2 = kmalloc(r->numprotos * sizeof(struct isdn_dr_prot),
M_DEVBUF, M_WAITOK);
if(!prots || !prots2)
/* $NetBSD: if_media.c,v 1.1 1997/03/17 02:55:15 thorpej Exp $ */
/* $FreeBSD: src/sys/net/if_media.c,v 1.9.2.4 2001/07/04 00:12:38 brooks Exp $ */
-/* $DragonFly: src/sys/net/if_media.c,v 1.10 2006/09/05 00:55:46 dillon Exp $ */
+/* $DragonFly: src/sys/net/if_media.c,v 1.11 2006/09/05 03:48:12 dillon Exp $ */
/*
* Copyright (c) 1997
return (EINVAL);
if (ifmr->ifm_count != 0) {
- kptr = (int *)malloc(ifmr->ifm_count * sizeof(int),
+ kptr = (int *)kmalloc(ifmr->ifm_count * sizeof(int),
M_TEMP, M_WAITOK);
/*
* This software is provided ``AS IS'' without any warranties of any kind.
*
* $FreeBSD: src/sys/netinet/ip_fw.c,v 1.131.2.39 2003/01/20 02:23:07 iedowse Exp $
- * $DragonFly: src/sys/net/ipfw/Attic/ip_fw.c,v 1.18 2006/09/05 00:55:47 dillon Exp $
+ * $DragonFly: src/sys/net/ipfw/Attic/ip_fw.c,v 1.19 2006/09/05 03:48:12 dillon Exp $
*/
#define DEB(x)
curr_dyn_buckets = dyn_buckets ;
if (ipfw_dyn_v != NULL)
kfree(ipfw_dyn_v, M_IPFW);
- ipfw_dyn_v = malloc(curr_dyn_buckets * sizeof r,
+ ipfw_dyn_v = kmalloc(curr_dyn_buckets * sizeof r,
M_IPFW, M_WAITOK | M_ZERO);
if (ipfw_dyn_v == NULL)
return NULL; /* failed ! */
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/netinet/ip_fw2.c,v 1.6.2.12 2003/04/08 10:42:32 maxim Exp $
- * $DragonFly: src/sys/net/ipfw/ip_fw2.c,v 1.21 2006/09/05 00:55:47 dillon Exp $
+ * $DragonFly: src/sys/net/ipfw/ip_fw2.c,v 1.22 2006/09/05 03:48:12 dillon Exp $
*/
#define DEB(x)
if (ipfw_dyn_v != NULL)
kfree(ipfw_dyn_v, M_IPFW);
for (;;) {
- ipfw_dyn_v = malloc(curr_dyn_buckets * sizeof(ipfw_dyn_rule *),
+ ipfw_dyn_v = kmalloc(curr_dyn_buckets * sizeof(ipfw_dyn_rule *),
M_IPFW, M_WAITOK | M_ZERO);
if (ipfw_dyn_v != NULL || curr_dyn_buckets <= 2)
break;
/* $FreeBSD: src/sys/contrib/pf/net/pf_if.c,v 1.6 2004/09/14 15:20:24 mlaier Exp $ */
/* $OpenBSD: pf_if.c,v 1.11 2004/03/15 11:38:23 cedric Exp $ */
/* add $OpenBSD: pf_if.c,v 1.19 2004/08/11 12:06:44 henning Exp $ */
-/* $DragonFly: src/sys/net/pf/pf_if.c,v 1.5 2006/09/05 00:55:47 dillon Exp $ */
+/* $DragonFly: src/sys/net/pf/pf_if.c,v 1.6 2006/09/05 03:48:12 dillon Exp $ */
/*
* Copyright (c) 2004 The DragonFly Project. All rights reserved.
TAILQ_INIT(&pfi_statehead);
pfi_buffer_max = 64;
- pfi_buffer = malloc(pfi_buffer_max * sizeof(*pfi_buffer),
+ pfi_buffer = kmalloc(pfi_buffer_max * sizeof(*pfi_buffer),
PFI_MTYPE, M_WAITOK);
pfi_self = pfi_if_create("self", NULL, PFI_IFLAG_GROUP);
pfi_dynamic_drivers();
/* $FreeBSD: src/sys/contrib/pf/net/pf_ioctl.c,v 1.12 2004/08/12 14:15:42 mlaier Exp $ */
/* $OpenBSD: pf_ioctl.c,v 1.112.2.2 2004/07/24 18:28:12 brad Exp $ */
-/* $DragonFly: src/sys/net/pf/pf_ioctl.c,v 1.8 2006/09/05 00:55:47 dillon Exp $ */
+/* $DragonFly: src/sys/net/pf/pf_ioctl.c,v 1.9 2006/09/05 03:48:12 dillon Exp $ */
/*
* Copyright (c) 2004 The DragonFly Project. All rights reserved.
if (a != NULL && !strcmp(a->name, anchorname))
anchor = a;
else {
- anchor = (struct pf_anchor *)malloc(sizeof(struct pf_anchor),
+ anchor = (struct pf_anchor *)kmalloc(sizeof(struct pf_anchor),
M_TEMP, M_NOWAIT);
if (anchor == NULL)
return (NULL);
r = TAILQ_NEXT(r, entries);
if (r != NULL && !strcmp(r->name, rulesetname))
return (r);
- ruleset = (struct pf_ruleset *)malloc(sizeof(struct pf_ruleset),
+ ruleset = (struct pf_ruleset *)kmalloc(sizeof(struct pf_ruleset),
M_TEMP, M_NOWAIT);
if (ruleset != NULL) {
pf_init_ruleset(ruleset);
return (0);
/* allocate and fill new struct pf_tagname */
- tag = (struct pf_tagname *)malloc(sizeof(struct pf_tagname),
+ tag = (struct pf_tagname *)kmalloc(sizeof(struct pf_tagname),
M_TEMP, M_NOWAIT);
if (tag == NULL)
return (0);
*
* @(#)radix.h 8.2 (Berkeley) 10/31/94
* $FreeBSD: src/sys/net/radix.h,v 1.16.2.1 2000/05/03 19:17:11 wollman Exp $
- * $DragonFly: src/sys/net/radix.h,v 1.11 2006/05/21 03:43:45 dillon Exp $
+ * $DragonFly: src/sys/net/radix.h,v 1.12 2006/09/05 03:48:12 dillon Exp $
*/
#ifndef _NET_RADIX_H_
#define R_Malloc(p, t, n) (p = (t) malloc((n)))
#define Free(p) free(p);
#else
-#define R_Malloc(p, t, n) (p = (t) malloc((n), M_RTABLE, M_INTWAIT | M_NULLOK))
-#define Free(p) free(p, M_RTABLE);
+#define R_Malloc(p, t, n) (p = (t) kmalloc((n), M_RTABLE, M_INTWAIT | M_NULLOK))
+#define Free(p) kfree(p, M_RTABLE);
#endif
void rn_init (void);
*
* @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95
* $FreeBSD: src/sys/netinet/tcp_subr.c,v 1.73.2.31 2003/01/24 05:11:34 sam Exp $
- * $DragonFly: src/sys/netinet/tcp_subr.c,v 1.52 2006/09/05 00:55:48 dillon Exp $
+ * $DragonFly: src/sys/netinet/tcp_subr.c,v 1.53 2006/09/05 03:48:12 dillon Exp $
*/
#include "opt_compat.h"
struct netmsg_remwildcard *msg;
cpu = (inp->inp_pcbinfo->cpu + 1) % ncpus2;
- msg = malloc(sizeof(struct netmsg_remwildcard),
+ msg = kmalloc(sizeof(struct netmsg_remwildcard),
M_LWKTMSG, M_INTWAIT);
lwkt_initmsg(&msg->nm_lmsg, &netisr_afree_rport, 0,
lwkt_cmd_func(in_pcbremwildcardhash_handler),
if (cpu == mycpu->gd_cpuid) {
tcp_drain_oncpu(&tcbinfo[cpu].pcblisthead);
} else {
- msg = malloc(sizeof(struct netmsg_tcp_drain),
+ msg = kmalloc(sizeof(struct netmsg_tcp_drain),
M_LWKTMSG, M_NOWAIT);
if (msg == NULL)
continue;
/* $FreeBSD: src/sys/netinet6/ah_core.c,v 1.2.2.5 2002/04/28 05:40:26 suz Exp $ */
-/* $DragonFly: src/sys/netinet6/ah_core.c,v 1.7 2006/09/05 00:55:48 dillon Exp $ */
+/* $DragonFly: src/sys/netinet6/ah_core.c,v 1.8 2006/09/05 03:48:12 dillon Exp $ */
/* $KAME: ah_core.c,v 1.44 2001/03/12 11:24:39 itojun Exp $ */
/*
panic("ah_hmac_sha1_init: what?");
state->sav = sav;
- state->foo = (void *)malloc(64 + 64 + sizeof(SHA1_CTX),
+ state->foo = (void *)kmalloc(64 + 64 + sizeof(SHA1_CTX),
M_TEMP, M_NOWAIT);
if (!state->foo)
return ENOBUFS;
panic("ah_hmac_sha2_256_init: what?");
state->sav = sav;
- state->foo = (void *)malloc(64 + 64 + sizeof(SHA256_CTX),
+ state->foo = (void *)kmalloc(64 + 64 + sizeof(SHA256_CTX),
M_TEMP, M_NOWAIT);
if (!state->foo)
return ENOBUFS;
panic("ah_hmac_sha2_384_init: what?");
state->sav = sav;
- state->foo = (void *)malloc(64 + 64 + sizeof(SHA384_CTX),
+ state->foo = (void *)kmalloc(64 + 64 + sizeof(SHA384_CTX),
M_TEMP, M_NOWAIT);
if (!state->foo)
return ENOBUFS;
panic("ah_hmac_sha2_512_init: what?");
state->sav = sav;
- state->foo = (void *)malloc(64 + 64 + sizeof(SHA512_CTX),
+ state->foo = (void *)kmalloc(64 + 64 + sizeof(SHA512_CTX),
M_TEMP, M_NOWAIT);
if (!state->foo)
return ENOBUFS;
/* $FreeBSD: src/sys/netinet6/in6.c,v 1.7.2.9 2002/04/28 05:40:26 suz Exp $ */
-/* $DragonFly: src/sys/netinet6/in6.c,v 1.20 2006/09/05 00:55:48 dillon Exp $ */
+/* $DragonFly: src/sys/netinet6/in6.c,v 1.21 2006/09/05 03:48:12 dillon Exp $ */
/* $KAME: in6.c,v 1.259 2002/01/21 11:37:50 keiichi Exp $ */
/*
ext = (struct in6_ifextra *)kmalloc(sizeof(*ext), M_IFADDR, M_WAITOK);
bzero(ext, sizeof(*ext));
- ext->in6_ifstat = (struct in6_ifstat *)malloc(sizeof(struct in6_ifstat),
+ ext->in6_ifstat = (struct in6_ifstat *)kmalloc(sizeof(struct in6_ifstat),
M_IFADDR, M_WAITOK);
bzero(ext->in6_ifstat, sizeof(*ext->in6_ifstat));
ext->icmp6_ifstat =
- (struct icmp6_ifstat *)malloc(sizeof(struct icmp6_ifstat),
+ (struct icmp6_ifstat *)kmalloc(sizeof(struct icmp6_ifstat),
M_IFADDR, M_WAITOK);
bzero(ext->icmp6_ifstat, sizeof(*ext->icmp6_ifstat));
/* $FreeBSD: src/sys/netinet6/ip6_output.c,v 1.13.2.18 2003/01/24 05:11:35 sam Exp $ */
-/* $DragonFly: src/sys/netinet6/ip6_output.c,v 1.20 2006/09/05 00:55:48 dillon Exp $ */
+/* $DragonFly: src/sys/netinet6/ip6_output.c,v 1.21 2006/09/05 03:48:12 dillon Exp $ */
/* $KAME: ip6_output.c,v 1.279 2002/01/26 06:12:30 jinmei Exp $ */
/*
dst->ip6po_hlim = src->ip6po_hlim;
if (src->ip6po_pktinfo) {
- dst->ip6po_pktinfo = malloc(sizeof(*dst->ip6po_pktinfo),
+ dst->ip6po_pktinfo = kmalloc(sizeof(*dst->ip6po_pktinfo),
M_IP6OPT, canwait);
if (dst->ip6po_pktinfo == NULL && canwait == M_NOWAIT)
goto bad;
*dst->ip6po_pktinfo = *src->ip6po_pktinfo;
}
if (src->ip6po_nexthop) {
- dst->ip6po_nexthop = malloc(src->ip6po_nexthop->sa_len,
+ dst->ip6po_nexthop = kmalloc(src->ip6po_nexthop->sa_len,
M_IP6OPT, canwait);
if (dst->ip6po_nexthop == NULL && canwait == M_NOWAIT)
goto bad;
if (needcopy) {
/* XXX: Is it really WAITOK? */
opt->ip6po_pktinfo =
- malloc(sizeof(struct in6_pktinfo),
+ kmalloc(sizeof(struct in6_pktinfo),
M_IP6OPT, M_WAITOK);
bcopy(CMSG_DATA(cm), opt->ip6po_pktinfo,
sizeof(struct in6_pktinfo));
if (needcopy) {
opt->ip6po_nexthop =
- malloc(*CMSG_DATA(cm),
+ kmalloc(*CMSG_DATA(cm),
M_IP6OPT, M_WAITOK);
bcopy(CMSG_DATA(cm),
opt->ip6po_nexthop,
/* $FreeBSD: src/sys/netinet6/ipsec.c,v 1.3.2.12 2003/05/06 06:46:58 suz Exp $ */
-/* $DragonFly: src/sys/netinet6/ipsec.c,v 1.15 2006/09/05 00:55:48 dillon Exp $ */
+/* $DragonFly: src/sys/netinet6/ipsec.c,v 1.16 2006/09/05 03:48:12 dillon Exp $ */
/* $KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $ */
/*
*/
q = &newchain;
for (p = src->req; p; p = p->next) {
- *q = (struct ipsecrequest *)malloc(sizeof(struct ipsecrequest),
+ *q = (struct ipsecrequest *)kmalloc(sizeof(struct ipsecrequest),
M_SECA, M_NOWAIT);
if (*q == NULL)
goto fail;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/sys/net80211/ieee80211_node.c,v 1.48.2.10 2006/03/13 03:05:47 sam Exp $
- * $DragonFly: src/sys/netproto/802_11/wlan/ieee80211_node.c,v 1.5 2006/09/05 00:55:48 dillon Exp $
+ * $DragonFly: src/sys/netproto/802_11/wlan/ieee80211_node.c,v 1.6 2006/09/05 03:48:12 dillon Exp $
*/
#include <sys/param.h>
ic->ic_max_aid = IEEE80211_AID_MAX;
ic->ic_aid_bitmap =
- malloc(howmany(ic->ic_max_aid, 32) * sizeof(uint32_t),
+ kmalloc(howmany(ic->ic_max_aid, 32) * sizeof(uint32_t),
M_DEVBUF, M_WAITOK | M_ZERO);
/* XXX defer until using hostap/ibss mode */
nt->nt_keyixmax = keyixmax;
if (nt->nt_keyixmax > 0) {
nt->nt_keyixmap =
- malloc(keyixmax * sizeof(struct ieee80211_node *),
+ kmalloc(keyixmax * sizeof(struct ieee80211_node *),
M_80211_NODE, M_WAITOK | M_ZERO);
} else {
nt->nt_keyixmap = NULL;
* THE POSSIBILITY OF SUCH DAMAGES.
*
* $FreeBSD: src/sys/dev/ath/ath_rate/amrr/amrr.c,v 1.8.2.3 2006/02/24 19:51:11 sam Exp $
- * $DragonFly: src/sys/netproto/802_11/wlan_ratectl/amrr/ieee80211_ratectl_amrr.c,v 1.2 2006/09/05 00:55:48 dillon Exp $
+ * $DragonFly: src/sys/netproto/802_11/wlan_ratectl/amrr/ieee80211_ratectl_amrr.c,v 1.3 2006/09/05 03:48:12 dillon Exp $
*/
/*
amrr_data_alloc(struct ieee80211_node *ni)
{
KKASSERT(ni->ni_rate_data == NULL);
- ni->ni_rate_data = malloc(sizeof(struct amrr_data),
+ ni->ni_rate_data = kmalloc(sizeof(struct amrr_data),
M_AMRR_RATECTL_DATA, M_NOWAIT | M_ZERO);
}
* THE POSSIBILITY OF SUCH DAMAGES.
*
* $FreeBSD: src/sys/dev/ath/ath_rate/onoe/onoe.c,v 1.8.2.3 2006/02/24 19:51:11 sam Exp $
- * $DragonFly: src/sys/netproto/802_11/wlan_ratectl/onoe/ieee80211_ratectl_onoe.c,v 1.2 2006/09/05 00:55:49 dillon Exp $
+ * $DragonFly: src/sys/netproto/802_11/wlan_ratectl/onoe/ieee80211_ratectl_onoe.c,v 1.3 2006/09/05 03:48:13 dillon Exp $
*/
/*
onoe_data_alloc(struct ieee80211_node *ni)
{
KKASSERT(ni->ni_rate_data == NULL);
- ni->ni_rate_data = malloc(sizeof(struct onoe_data),
+ ni->ni_rate_data = kmalloc(sizeof(struct onoe_data),
M_ONOE_RATECTL_DATA, M_NOWAIT | M_ZERO);
}
* notice must be reproduced on all copies.
*
* @(#) $FreeBSD: src/sys/netatm/port.h,v 1.2.2.2 2003/01/23 21:06:44 sam Exp $
- * @(#) $DragonFly: src/sys/netproto/atm/port.h,v 1.7 2005/02/01 00:51:50 joerg Exp $
+ * @(#) $DragonFly: src/sys/netproto/atm/port.h,v 1.8 2006/09/05 03:48:13 dillon Exp $
*
*/
*/
#ifdef ATM_KERNEL
#include <sys/malloc.h>
-#define KM_ALLOC(size, type, flags) malloc((size), (type), (flags))
-#define KM_FREE(addr, size, type) free((addr), (type))
+#define KM_ALLOC(size, type, flags) kmalloc((size), (type), (flags))
+#define KM_FREE(addr, size, type) kfree((addr), (type))
#define KM_CMP(b1, b2, len) bcmp((b1), (b2), (len))
#define KM_COPY(from, to, len) bcopy((from), (to), (len))
* UM_ZERO(addr, len) Zeros len bytes of data from addr.
*
*/
-#define UM_ALLOC(size) malloc((size_t)(size))
-#define UM_FREE(addr) free((void *)(addr))
+#define UM_ALLOC(size) kmalloc((size_t)(size))
+#define UM_FREE(addr) kfree((void *)(addr))
#define UM_COPY(from, to, len) bcopy((void *)(from), (void *)(to),\
(size_t)(len))
#define UM_ZERO(addr, len) bzero((void *)(addr), (size_t)(len))
/* $FreeBSD: src/sys/opencrypto/crypto.c,v 1.4.2.7 2003/06/03 00:09:02 sam Exp $ */
-/* $DragonFly: src/sys/opencrypto/crypto.c,v 1.11 2006/09/05 00:55:49 dillon Exp $ */
+/* $DragonFly: src/sys/opencrypto/crypto.c,v 1.12 2006/09/05 03:48:13 dillon Exp $ */
/* $OpenBSD: crypto.c,v 1.38 2002/06/11 11:14:29 beck Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
}
crypto_drivers_num = CRYPTO_DRIVERS_INITIAL;
- crypto_drivers = malloc(crypto_drivers_num *
+ crypto_drivers = kmalloc(crypto_drivers_num *
sizeof(struct cryptocap), M_CRYPTO_DATA, M_NOWAIT | M_ZERO);
if (crypto_drivers == NULL) {
printf("crypto_init: cannot malloc driver table\n");
return -1;
}
- newdrv = malloc(2 * crypto_drivers_num *
+ newdrv = kmalloc(2 * crypto_drivers_num *
sizeof(struct cryptocap), M_CRYPTO_DATA, M_NOWAIT|M_ZERO);
if (newdrv == NULL) {
crit_exit();
/* $FreeBSD: src/sys/opencrypto/cryptosoft.c,v 1.2.2.1 2002/11/21 23:34:23 sam Exp $ */
-/* $DragonFly: src/sys/opencrypto/cryptosoft.c,v 1.4 2006/09/05 00:55:49 dillon Exp $ */
+/* $DragonFly: src/sys/opencrypto/cryptosoft.c,v 1.5 2006/09/05 03:48:13 dillon Exp $ */
/* $OpenBSD: cryptosoft.c,v 1.35 2002/04/26 08:43:50 deraadt Exp $ */
/*
} else
swcr_sesnum *= 2;
- swd = malloc(swcr_sesnum * sizeof(struct swcr_data *),
+ swd = kmalloc(swcr_sesnum * sizeof(struct swcr_data *),
M_CRYPTO_DATA, M_NOWAIT|M_ZERO);
if (swd == NULL) {
/* Reset session number */
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.16.2.2 2003/01/23 00:55:27 scottl Exp $
- * $DragonFly: src/sys/platform/pc32/i386/busdma_machdep.c,v 1.14 2006/09/05 00:55:45 dillon Exp $
+ * $DragonFly: src/sys/platform/pc32/i386/busdma_machdep.c,v 1.15 2006/09/05 03:48:11 dillon Exp $
*/
#include <sys/param.h>
if (dmat->segments == NULL) {
KKASSERT(dmat->nsegments && dmat->nsegments < 16384);
- dmat->segments = malloc(sizeof(bus_dma_segment_t) *
+ dmat->segments = kmalloc(sizeof(bus_dma_segment_t) *
dmat->nsegments, M_DEVBUF, M_INTWAIT);
}
if (dmat->segments == NULL) {
KKASSERT(dmat->nsegments < 16384);
- dmat->segments = malloc(sizeof(bus_dma_segment_t) *
+ dmat->segments = kmalloc(sizeof(bus_dma_segment_t) *
dmat->nsegments, M_DEVBUF, M_INTWAIT);
}
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/i386/i386/i686_mem.c,v 1.8.2.4 2002/09/24 08:12:51 mdodd Exp $
- * $DragonFly: src/sys/platform/pc32/i386/i686_mem.c,v 1.4 2005/08/29 21:08:02 dillon Exp $
+ * $DragonFly: src/sys/platform/pc32/i386/i686_mem.c,v 1.5 2006/09/05 03:48:11 dillon Exp $
*/
#include <sys/param.h>
}
sc->mr_desc =
- (struct mem_range_desc *)malloc(nmdesc * sizeof(struct mem_range_desc),
+ (struct mem_range_desc *)kmalloc(nmdesc * sizeof(struct mem_range_desc),
M_MEMDESC, M_WAITOK);
bzero(sc->mr_desc, nmdesc * sizeof(struct mem_range_desc));
sc->mr_ndesc = nmdesc;
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/i386/i386/k6_mem.c,v 1.4.2.2 2002/09/16 21:58:41 dwmalone Exp $
- * $DragonFly: src/sys/platform/pc32/i386/k6_mem.c,v 1.5 2005/01/06 08:33:11 asmodai Exp $
+ * $DragonFly: src/sys/platform/pc32/i386/k6_mem.c,v 1.6 2006/09/05 03:48:11 dillon Exp $
*
*/
sc->mr_cap = 0;
sc->mr_ndesc = 2; /* XXX (BFF) For now, we only have one msr for this */
- sc->mr_desc = malloc(sc->mr_ndesc * sizeof(struct mem_range_desc),
+ sc->mr_desc = kmalloc(sc->mr_ndesc * sizeof(struct mem_range_desc),
M_MEMDESC, M_WAITOK);
if (sc->mr_desc == NULL)
panic("k6_mrinit: malloc returns NULL");
* from: Utah $Hdr: mem.c 1.13 89/10/08$
* from: @(#)mem.c 7.2 (Berkeley) 5/9/91
* $FreeBSD: src/sys/i386/i386/mem.c,v 1.79.2.9 2003/01/04 22:58:01 njl Exp $
- * $DragonFly: src/sys/platform/pc32/i386/Attic/mem.c,v 1.18 2006/09/05 00:55:45 dillon Exp $
+ * $DragonFly: src/sys/platform/pc32/i386/Attic/mem.c,v 1.19 2006/09/05 03:48:11 dillon Exp $
*/
/*
nd = imin(mo->mo_arg[0], mem_range_softc.mr_ndesc);
if (nd > 0) {
md = (struct mem_range_desc *)
- malloc(nd * sizeof(struct mem_range_desc),
+ kmalloc(nd * sizeof(struct mem_range_desc),
M_MEMDESC, M_WAITOK);
error = mem_range_attr_get(md, &nd);
if (!error)
break;
case MEMRANGE_SET:
- md = (struct mem_range_desc *)malloc(sizeof(struct mem_range_desc),
+ md = (struct mem_range_desc *)kmalloc(sizeof(struct mem_range_desc),
M_MEMDESC, M_WAITOK);
error = copyin(mo->mo_desc, md, sizeof(struct mem_range_desc));
/* clamp description string */
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/posix4/posix4.h,v 1.6 1999/12/27 10:22:09 bde Exp $
- * $DragonFly: src/sys/sys/posix4.h,v 1.5 2003/11/27 19:11:17 dillon Exp $
+ * $DragonFly: src/sys/sys/posix4.h,v 1.6 2006/09/05 03:48:11 dillon Exp $
*/
#include "opt_posix.h"
MALLOC_DECLARE(M_P31B);
-#define p31b_malloc(SIZE) malloc((SIZE), M_P31B, M_WAITOK)
-#define p31b_free(P) free((P), M_P31B)
+#define p31b_malloc(SIZE) kmalloc((SIZE), M_P31B, M_WAITOK)
+#define p31b_free(P) kfree((P), M_P31B)
struct proc;
*
* @(#)ffs_vfsops.c 8.8 (Berkeley) 4/18/94
* $FreeBSD: src/sys/gnu/ext2fs/ext2_vfsops.c,v 1.63.2.7 2002/07/01 00:18:51 iedowse Exp $
- * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_vfsops.c,v 1.48 2006/09/03 18:52:29 dillon Exp $
+ * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_vfsops.c,v 1.49 2006/09/05 03:48:13 dillon Exp $
*/
#include "opt_quota.h"
};
VFS_SET(ext2fs_vfsops, ext2fs, 0);
-#define bsd_malloc malloc
-#define bsd_free free
+#define bsd_malloc kmalloc
+#define bsd_free kfree
static int ext2fs_inode_hash_lock;
*
* @(#)cd9660_node.c 8.2 (Berkeley) 1/23/94
* $FreeBSD: src/sys/isofs/cd9660/cd9660_node.c,v 1.29.2.1 2000/07/08 14:35:56 bp Exp $
- * $DragonFly: src/sys/vfs/isofs/cd9660/cd9660_node.c,v 1.18 2006/09/05 00:55:50 dillon Exp $
+ * $DragonFly: src/sys/vfs/isofs/cd9660/cd9660_node.c,v 1.19 2006/09/05 03:48:13 dillon Exp $
*/
#include <sys/param.h>
isohash = 16;
while (isohash < hlimit)
isohash <<= 1;
- isohashtbl = malloc(sizeof(void *) * isohash,
+ isohashtbl = kmalloc(sizeof(void *) * isohash,
M_ISOFSMNT, M_WAITOK|M_ZERO);
--isohash;
lwkt_token_init(&cd9660_ihash_token);
/* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/msdosfs/Attic/msdosfs_vfsops.c,v 1.60.2.8 2004/03/02 09:43:04 tjr Exp $ */
-/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_vfsops.c,v 1.38 2006/09/05 00:55:50 dillon Exp $ */
+/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_vfsops.c,v 1.39 2006/09/05 03:48:13 dillon Exp $ */
/* $NetBSD: msdosfs_vfsops.c,v 1.51 1997/11/17 15:36:58 ws Exp $ */
/*-
* Allocate memory for the bitmap of allocated clusters, and then
* fill it in.
*/
- pmp->pm_inusemap = malloc(((pmp->pm_maxcluster + N_INUSEBITS - 1)
+ pmp->pm_inusemap = kmalloc(((pmp->pm_maxcluster + N_INUSEBITS - 1)
/ N_INUSEBITS)
* sizeof(*pmp->pm_inusemap),
M_MSDOSFSFAT, M_WAITOK);
* nfs/krpc_subr.c
* $NetBSD: krpc_subr.c,v 1.10 1995/08/08 20:43:43 gwr Exp $
* $FreeBSD: src/sys/nfs/bootp_subr.c,v 1.20.2.9 2003/04/24 16:51:08 ambrisko Exp $
- * $DragonFly: src/sys/vfs/nfs/bootp_subr.c,v 1.18 2006/09/05 00:55:50 dillon Exp $
+ * $DragonFly: src/sys/vfs/nfs/bootp_subr.c,v 1.19 2006/09/05 03:48:13 dillon Exp $
*/
#include "opt_bootp.h"
allocifctx(struct bootpc_globalcontext *gctx)
{
struct bootpc_ifcontext *ifctx;
- ifctx = (struct bootpc_ifcontext *) malloc(sizeof(*ifctx),
+ ifctx = (struct bootpc_ifcontext *) kmalloc(sizeof(*ifctx),
M_TEMP, M_WAITOK);
if (ifctx == NULL)
panic("Failed to allocate bootp interface context structure");
*
* @(#)nfs_socket.c 8.5 (Berkeley) 3/30/95
* $FreeBSD: src/sys/nfs/nfs_socket.c,v 1.60.2.6 2003/03/26 01:44:46 alfred Exp $
- * $DragonFly: src/sys/vfs/nfs/nfs_socket.c,v 1.36 2006/09/05 00:55:50 dillon Exp $
+ * $DragonFly: src/sys/vfs/nfs/nfs_socket.c,v 1.37 2006/09/05 03:48:13 dillon Exp $
*/
/*
struct nfsrv_rec *rec;
int mf = (waitflag & MB_DONTWAIT) ?
M_NOWAIT : M_WAITOK;
- rec = malloc(sizeof(struct nfsrv_rec),
+ rec = kmalloc(sizeof(struct nfsrv_rec),
M_NFSRVDESC, mf);
if (!rec) {
if (nam)
*
* @(#)nfs_srvcache.c 8.3 (Berkeley) 3/30/95
* $FreeBSD: src/sys/nfs/nfs_srvcache.c,v 1.21 2000/02/13 03:32:06 peter Exp $
- * $DragonFly: src/sys/vfs/nfs/nfs_srvcache.c,v 1.11 2006/09/05 00:55:50 dillon Exp $
+ * $DragonFly: src/sys/vfs/nfs/nfs_srvcache.c,v 1.12 2006/09/05 03:48:13 dillon Exp $
*/
/*
nfsstats.srvcache_misses++;
NFS_DPF(RC, ("M%03x", nd->nd_retxid & 0xfff));
if (numnfsrvcache < desirednfsrvcache) {
- rp = (struct nfsrvcache *)malloc((u_long)sizeof *rp,
+ rp = (struct nfsrvcache *)kmalloc((u_long)sizeof *rp,
M_NFSD, M_WAITOK);
bzero((char *)rp, sizeof *rp);
numnfsrvcache++;
*
* @(#)lofs_vfsops.c 1.2 (Berkeley) 6/18/92
* $FreeBSD: src/sys/miscfs/nullfs/null_vfsops.c,v 1.35.2.3 2001/07/26 20:37:11 iedowse Exp $
- * $DragonFly: src/sys/vfs/nullfs/null_vfsops.c,v 1.25 2006/09/05 00:55:50 dillon Exp $
+ * $DragonFly: src/sys/vfs/nullfs/null_vfsops.c,v 1.26 2006/09/05 03:48:13 dillon Exp $
*/
/*
&rootvp);
}
- xmp = (struct null_mount *) malloc(sizeof(struct null_mount),
+ xmp = (struct null_mount *) kmalloc(sizeof(struct null_mount),
M_NULLFSMNT, M_WAITOK); /* XXX */
/*