after discussions with beck deraadt kettenis.
-/* $OpenBSD: interrupt.c,v 1.32 2014/01/26 17:40:09 miod Exp $ */
+/* $OpenBSD: interrupt.c,v 1.33 2014/07/12 18:44:40 tedu Exp $ */
/* $NetBSD: interrupt.c,v 1.46 2000/06/03 20:47:36 thorpej Exp $ */
/*-
}
mtx_leave(&asi->softintr_mtx);
- free(sih, M_DEVBUF);
+ free(sih, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: bus_dma.c,v 1.32 2014/07/11 09:36:25 mpi Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.33 2014/07/12 18:44:40 tedu Exp $ */
/* $NetBSD: bus_dma.c,v 1.40 2000/07/17 04:47:56 thorpej Exp $ */
/*-
bus_dmamap_t map;
{
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: sgmap_common.c,v 1.12 2014/06/14 23:11:20 jmatthew Exp $ */
+/* $OpenBSD: sgmap_common.c,v 1.13 2014/07/12 18:44:40 tedu Exp $ */
/* $NetBSD: sgmap_common.c,v 1.13 2000/06/29 09:02:57 mrg Exp $ */
/*-
alpha_sgmap_dmamap_teardown(map)
bus_dmamap_t map;
{
- free(map->_dm_cookie, M_DEVBUF);
+ free(map->_dm_cookie, M_DEVBUF, 0);
}
void
-/* $OpenBSD: shared_intr.c,v 1.18 2011/04/15 20:40:05 deraadt Exp $ */
+/* $OpenBSD: shared_intr.c,v 1.19 2014/07/12 18:44:40 tedu Exp $ */
/* $NetBSD: shared_intr.c,v 1.13 2000/03/19 01:46:18 thorpej Exp $ */
/*
*/
evcount_detach(&ih->ih_count);
TAILQ_REMOVE(&intr[num].intr_q, ih, ih_q);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
}
int
-/* $OpenBSD: eisa_machdep.c,v 1.4 2013/07/17 13:57:24 martin Exp $ */
+/* $OpenBSD: eisa_machdep.c,v 1.5 2014/07/12 18:44:40 tedu Exp $ */
/* $NetBSD: eisa_machdep.c,v 1.1 2000/07/29 23:18:47 thorpej Exp $ */
/*-
}
}
- free(cdata, M_TEMP);
- free(data, M_TEMP);
+ free(cdata, M_TEMP, 0);
+ free(data, M_TEMP, 0);
}
/*
-/* $OpenBSD: isadma_bounce.c,v 1.10 2010/11/20 20:58:49 miod Exp $ */
+/* $OpenBSD: isadma_bounce.c,v 1.11 2014/07/12 18:44:40 tedu Exp $ */
/* $NetBSD: isadma_bounce.c,v 1.3 2000/06/29 09:02:57 mrg Exp $ */
/*-
out:
if (error) {
if (map->_dm_cookie != NULL)
- free(map->_dm_cookie, M_DEVBUF);
+ free(map->_dm_cookie, M_DEVBUF, 0);
_bus_dmamap_destroy(t, map);
}
return (error);
if (cookie->id_flags & ID_HAS_BOUNCE)
isadma_bounce_free_bouncebuf(t, map);
- free(cookie, M_DEVBUF);
+ free(cookie, M_DEVBUF, 0);
_bus_dmamap_destroy(t, map);
}
-/* $OpenBSD: disk.c,v 1.13 2013/11/12 01:37:40 krw Exp $ */
+/* $OpenBSD: disk.c,v 1.14 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: disk.c,v 1.6 1997/04/06 08:40:33 cgd Exp $ */
/*
if (part >= lp->d_npartitions ||
DL_GETPSIZE(&lp->d_partitions[part]) == 0) {
-bad: free(sc, sizeof(struct disk_softc));
+bad: free(sc, sizeof(struct disk_softc), 0);
return (ENXIO);
}
return (0);
sc = f->f_devdata;
(void)prom_close(sc->sc_fd);
- free(sc, sizeof(struct disk_softc));
+ free(sc, sizeof(struct disk_softc), 0);
f->f_devdata = NULL;
return (0);
}
-/* $OpenBSD: installboot.c,v 1.17 2013/06/11 16:42:06 deraadt Exp $ */
+/* $OpenBSD: installboot.c,v 1.18 2014/07/12 18:44:40 tedu Exp $ */
/* $NetBSD: installboot.c,v 1.2 1997/04/06 08:41:12 cgd Exp $ */
/*
}
if (read(fd, bp, statbuf.st_size) != statbuf.st_size) {
warn("read: %s", fname);
- free(bp);
+ free(bp, 0);
close(fd);
return NULL;
}
-/* $OpenBSD: setnetbootinfo.c,v 1.2 2003/05/11 19:41:09 deraadt Exp $ */
+/* $OpenBSD: setnetbootinfo.c,v 1.3 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: setnetbootinfo.c,v 1.5 1997/04/06 08:41:37 cgd Exp $ */
/*
printf("closing %s...\n", outfilename);
close(fd);
- free(netbb);
+ free(netbb, 0);
if (outfile == NULL)
- free(outfilename);
+ free(outfilename, 0);
exit (0);
}
-/* $OpenBSD: aesni.c,v 1.26 2014/01/18 23:17:24 mikeb Exp $ */
+/* $OpenBSD: aesni.c,v 1.27 2014/07/12 18:44:41 tedu Exp $ */
/*-
* Copyright (c) 2003 Jason Wright
* Copyright (c) 2003, 2004 Theo de Raadt
aesni_sc->sc_cid = crypto_get_driverid(0);
if (aesni_sc->sc_cid < 0) {
- free(aesni_sc, M_DEVBUF);
+ free(aesni_sc, M_DEVBUF, 0);
return;
}
if (ses->ses_ghash) {
explicit_bzero(ses->ses_ghash, sizeof(GHASH_CTX));
- free(ses->ses_ghash, M_CRYPTO_DATA);
+ free(ses->ses_ghash, M_CRYPTO_DATA, 0);
}
if (ses->ses_xts) {
explicit_bzero(ses->ses_xts, sizeof(struct aesni_xts_ctx));
- free(ses->ses_xts, M_CRYPTO_DATA);
+ free(ses->ses_xts, M_CRYPTO_DATA, 0);
}
if (ses->ses_swd) {
if (swd->sw_ictx) {
explicit_bzero(swd->sw_ictx, axf->ctxsize);
- free(swd->sw_ictx, M_CRYPTO_DATA);
+ free(swd->sw_ictx, M_CRYPTO_DATA, 0);
}
if (swd->sw_octx) {
explicit_bzero(swd->sw_octx, axf->ctxsize);
- free(swd->sw_octx, M_CRYPTO_DATA);
+ free(swd->sw_octx, M_CRYPTO_DATA, 0);
}
- free(swd, M_CRYPTO_DATA);
+ free(swd, M_CRYPTO_DATA, 0);
}
explicit_bzero(ses, sizeof (*ses));
if (crd->crd_len > aesni_sc->sc_buflen) {
if (buf != NULL) {
explicit_bzero(buf, aesni_sc->sc_buflen);
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
}
aesni_sc->sc_buflen = 0;
-/* $OpenBSD: bus_dma.c,v 1.44 2014/07/11 09:36:25 mpi Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.45 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: bus_dma.c,v 1.3 2003/05/07 21:33:58 fvdl Exp $ */
/*-
_bus_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
{
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: est.c,v 1.32 2014/05/23 03:30:41 guenther Exp $ */
+/* $OpenBSD: est.c,v 1.33 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2003 Michael Eriksson.
* All rights reserved.
return acpilist;
notable:
- free(acpilist, M_DEVBUF);
+ free(acpilist, M_DEVBUF, 0);
acpilist = NULL;
nolist:
return NULL;
M_DEVBUF, M_NOWAIT)) == NULL) {
printf("est_acpi_pss_changed: cannot allocate memory for new "
"operating points");
- free(acpilist, M_DEVBUF);
+ free(acpilist, M_DEVBUF, 0);
return;
}
needtran = 0;
}
- free(est_fqlist->table, M_DEVBUF);
- free(est_fqlist, M_DEVBUF);
+ free(est_fqlist->table, M_DEVBUF, 0);
+ free(est_fqlist, M_DEVBUF, 0);
est_fqlist = acpilist;
if (needtran) {
if ((fake_table = malloc(sizeof(struct est_op) * 3, M_DEVBUF,
M_NOWAIT)) == NULL) {
- free(fake_fqlist, M_DEVBUF);
+ free(fake_fqlist, M_DEVBUF, 0);
printf("%s: EST: cannot allocate memory for fake "
"table\n", cpu_device);
return;
return;
nospeedstep:
- free(est_fqlist->table, M_DEVBUF);
- free(est_fqlist, M_DEVBUF);
+ free(est_fqlist->table, M_DEVBUF, 0);
+ free(est_fqlist, M_DEVBUF, 0);
}
void
-/* $OpenBSD: intr.c,v 1.36 2014/03/29 18:09:28 guenther Exp $ */
+/* $OpenBSD: intr.c,v 1.37 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: intr.c,v 1.3 2003/03/03 22:16:20 fvdl Exp $ */
/*
idtvec = idt_vec_alloc(APIC_LEVEL(level), IDT_INTR_HIGH);
if (idtvec == 0) {
simple_lock(&ci->ci_slock);
- free(ci->ci_isources[slot], M_DEVBUF);
+ free(ci->ci_isources[slot], M_DEVBUF, 0);
ci->ci_isources[slot] = NULL;
simple_unlock(&ci->ci_slock);
return EBUSY;
if (source->is_handlers != NULL &&
source->is_pic->pic_type != pic->pic_type) {
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
printf("intr_establish: can't share intr source between "
"different PIC types (legacy_irq %d pin %d slot %d)\n",
legacy_irq, pin, slot);
printf("intr_establish: pic %s pin %d: can't share "
"type %d with %d\n", pic->pic_name, pin,
source->is_type, type);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
return NULL;
}
break;
#endif
if (source->is_handlers == NULL) {
- free(source, M_DEVBUF);
+ free(source, M_DEVBUF, 0);
ci->ci_isources[ih->ih_slot] = NULL;
if (pic != &i8259_pic)
idt_vec_free(idtvec);
}
evcount_detach(&ih->ih_count);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
simple_unlock(&ci->ci_slock);
}
-/* $OpenBSD: k1x-pstate.c,v 1.5 2013/10/05 18:47:05 brynet Exp $ */
+/* $OpenBSD: k1x-pstate.c,v 1.6 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2011 Bryan Steele <brynet@gmail.com>
*
setperf_prio = 1;
return;
}
- free(cstate, M_DEVBUF);
+ free(cstate, M_DEVBUF, 0);
}
-/* $OpenBSD: mem.c,v 1.16 2013/12/19 21:30:02 deraadt Exp $ */
+/* $OpenBSD: mem.c,v 1.17 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1982, 1986, 1990, 1993
if (!error)
error = copyout(md, mo->mo_desc,
nd * sizeof(struct mem_range_desc));
- free(md, M_MEMDESC);
+ free(md, M_MEMDESC, 0);
} else {
nd = mem_range_softc.mr_ndesc;
}
md->mr_owner[sizeof(md->mr_owner) - 1] = 0;
if (error == 0)
error = mem_range_attr_set(md, &mo->mo_arg[0]);
- free(md, M_MEMDESC);
+ free(md, M_MEMDESC, 0);
break;
}
return (error);
-/* $OpenBSD: powernow-k8.c,v 1.22 2010/04/20 22:05:41 tedu Exp $ */
+/* $OpenBSD: powernow-k8.c,v 1.23 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2004 Martin Végiard.
* Copyright (c) 2004-2005 Bruno Ducrot
if (needtran)
k8pnow_transition(nstate, curs);
- free(cstate, M_DEVBUF);
+ free(cstate, M_DEVBUF, 0);
k8pnow_current_state = nstate;
}
setperf_prio = 1;
return;
}
- free(cstate, M_DEVBUF);
+ free(cstate, M_DEVBUF, 0);
}
-/* $OpenBSD: softintr.c,v 1.5 2009/04/19 19:13:57 oga Exp $ */
+/* $OpenBSD: softintr.c,v 1.6 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: softintr.c,v 1.1 2003/02/26 21:26:12 fvdl Exp $ */
/*-
}
mtx_leave(&si->softintr_lock);
- free(sih, M_DEVBUF);
+ free(sih, M_DEVBUF, 0);
}
-/* $OpenBSD: via.c,v 1.15 2014/03/29 18:09:28 guenther Exp $ */
+/* $OpenBSD: via.c,v 1.16 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
vc3_sc->sc_cid = crypto_get_driverid(0);
if (vc3_sc->sc_cid < 0) {
- free(vc3_sc, M_DEVBUF);
+ free(vc3_sc, M_DEVBUF, 0);
return; /* YYY bitch? */
}
return (ENOMEM);
bcopy(sc->sc_sessions, ses, sesn * sizeof(*ses));
explicit_bzero(sc->sc_sessions, sesn * sizeof(*ses));
- free(sc->sc_sessions, M_DEVBUF);
+ free(sc->sc_sessions, M_DEVBUF, 0);
sc->sc_sessions = ses;
ses = &sc->sc_sessions[sesn];
sc->sc_nsessions++;
if (swd->sw_ictx) {
explicit_bzero(swd->sw_ictx, axf->ctxsize);
- free(swd->sw_ictx, M_CRYPTO_DATA);
+ free(swd->sw_ictx, M_CRYPTO_DATA, 0);
}
if (swd->sw_octx) {
explicit_bzero(swd->sw_octx, axf->ctxsize);
- free(swd->sw_octx, M_CRYPTO_DATA);
+ free(swd->sw_octx, M_CRYPTO_DATA, 0);
}
- free(swd, M_CRYPTO_DATA);
+ free(swd, M_CRYPTO_DATA, 0);
}
explicit_bzero(&sc->sc_sessions[sesn], sizeof(sc->sc_sessions[sesn]));
if (sc->op_buf != NULL) {
explicit_bzero(sc->op_buf, crd->crd_len);
- free(sc->op_buf, M_DEVBUF);
+ free(sc->op_buf, M_DEVBUF, 0);
sc->op_buf = NULL;
}
-/* $OpenBSD: isa_machdep.c,v 1.22 2010/11/20 20:58:51 miod Exp $ */
+/* $OpenBSD: isa_machdep.c,v 1.23 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: isa_machdep.c,v 1.22 1997/06/12 23:57:32 thorpej Exp $ */
#define ISA_DMA_STATS
out:
if (error) {
if (map->_dm_cookie != NULL)
- free(map->_dm_cookie, M_DEVBUF);
+ free(map->_dm_cookie, M_DEVBUF, 0);
_bus_dmamap_destroy(t, map);
}
return (error);
if (cookie->id_flags & ID_HAS_BOUNCE)
_isa_dma_free_bouncebuf(t, map);
- free(cookie, M_DEVBUF);
+ free(cookie, M_DEVBUF, 0);
_bus_dmamap_destroy(t, map);
}
-/* $OpenBSD: agp_machdep.c,v 1.11 2014/04/01 09:05:03 mpi Exp $ */
+/* $OpenBSD: agp_machdep.c,v 1.12 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2008 - 2009 Owain G. Ainsworth <oga@openbsd.org>
map->size = size;
if ((err = bus_space_map(tag, address, size, flags, &map->bsh)) != 0) {
- free(map, M_AGP);
+ free(map, M_AGP, 0);
return (err);
}
*mapp = map;
agp_destroy_map(struct agp_map *map)
{
bus_space_unmap(map->bst, map->bsh, map->size);
- free(map, M_AGP);
+ free(map, M_AGP, 0);
}
-/* $OpenBSD: vga_post.c,v 1.6 2014/04/08 09:02:51 mpi Exp $ */
+/* $OpenBSD: vga_post.c,v 1.7 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: vga_post.c,v 1.12 2009/03/15 21:32:36 cegger Exp $ */
/*-
&sc->ram_backing, BASE_MEMORY/PAGE_SIZE, UVM_PLA_WAITOK);
if (err) {
uvm_km_free(kernel_map, sc->sys_image, 1024 * 1024);
- free(sc, M_DEVBUF);
+ free(sc, M_DEVBUF, 0);
return NULL;
}
pmap_kremove(sc->sys_image, 1024 * 1024);
uvm_km_free(kernel_map, sc->sys_image, 1024 * 1024);
pmap_update(pmap_kernel());
- free(sc, M_DEVBUF);
+ free(sc, M_DEVBUF, 0);
}
#ifdef DDB
-/* $OpenBSD: diskprobe.c,v 1.13 2013/11/05 00:51:58 krw Exp $ */
+/* $OpenBSD: diskprobe.c,v 1.14 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
if (debug)
printf(" <!fd%u>", i);
#endif
- free(dip, 0);
+ free(dip, 0, 0);
break;
}
if (debug)
printf(" <!hd%u>", i&0x7f);
#endif
- free(dip, 0);
+ free(dip, 0, 0);
break;
}
#if 0
if (bios_getdiskinfo(cddev, &dip->bios_info)) {
printf(" <!cd0>"); /* XXX */
- free(dip, 0);
+ free(dip, 0, 0);
return;
}
#endif
-/* $OpenBSD: softraid.c,v 1.6 2013/12/28 02:40:41 jsing Exp $ */
+/* $OpenBSD: softraid.c,v 1.7 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2012 Joel Sing <jsing@openbsd.org>
}
explicit_bzero(md, SR_META_SIZE * 512);
- free(md, 0);
+ free(md, 0, 0);
}
int
continue;
if (bv->sbv_keys != NULL) {
explicit_bzero(bv->sbv_keys, SR_CRYPTO_KEYBLOCK_BYTES);
- free(bv->sbv_keys, 0);
+ free(bv->sbv_keys, 0, 0);
bv->sbv_keys = NULL;
}
if (bv->sbv_maskkey != NULL) {
explicit_bzero(bv->sbv_maskkey, SR_CRYPTO_MAXKEYBYTES);
- free(bv->sbv_maskkey, 0);
+ free(bv->sbv_maskkey, 0, 0);
bv->sbv_maskkey = NULL;
}
}
SLIST_FOREACH(kd, &sr_keydisks, kd_link) {
explicit_bzero(kd, sizeof(*kd));
- free(kd, 0);
+ free(kd, 0, 0);
}
}
if (keys != NULL && rv != 0) {
explicit_bzero(keys, SR_CRYPTO_KEYBLOCK_BYTES);
- free(keys, 0);
+ free(keys, 0, 0);
}
return (rv);
-/* $OpenBSD: bus_dma.c,v 1.25 2014/07/11 09:36:25 mpi Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.26 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: bus_dma.c,v 1.38 2003/10/30 08:44:13 scw Exp $ */
/*-
map->_dm_buftype = ARM32_BUFTYPE_INVALID;
map->_dm_proc = NULL;
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: pmap7.c,v 1.14 2014/05/08 21:17:00 miod Exp $ */
+/* $OpenBSD: pmap7.c,v 1.15 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: pmap.c,v 1.147 2004/01/18 13:03:50 scw Exp $ */
/*
/* free backing va */
uvm_km_free(kernel_map, (vaddr_t)l1->l1_kva, L1_TABLE_SIZE);
- free(l1, M_VMPMAP);
+ free(l1, M_VMPMAP, 0);
}
/*
-/* $OpenBSD: softintr.c,v 1.7 2010/12/21 14:56:23 claudio Exp $ */
+/* $OpenBSD: softintr.c,v 1.8 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: softintr.c,v 1.2 2003/07/15 00:24:39 lukem Exp $ */
/*
}
mtx_leave(&siq->siq_mtx);
- free(sih, M_DEVBUF);
+ free(sih, M_DEVBUF, 0);
}
-/* $OpenBSD: undefined.c,v 1.5 2011/09/20 22:02:11 miod Exp $ */
+/* $OpenBSD: undefined.c,v 1.6 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: undefined.c,v 1.22 2003/11/29 22:21:29 bjh21 Exp $ */
/*
struct undefined_handler *uh = cookie;
LIST_REMOVE(uh, uh_link);
- free(uh, M_TEMP);
+ free(uh, M_TEMP, 0);
}
-/* $OpenBSD: ampintc.c,v 1.2 2013/09/06 21:40:28 patrick Exp $ */
+/* $OpenBSD: ampintc.c,v 1.3 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2007,2009,2011 Dale Rahn <drahn@openbsd.org>
*
TAILQ_REMOVE(&sc->sc_ampintc_handler[irqno].iq_list, ih, ih_list);
if (ih->ih_name != NULL)
evcount_detach(&ih->ih_count);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
restore_interrupts(psw);
#endif
}
-/* $OpenBSD: pxa2x0_gpio.c,v 1.23 2014/05/08 21:17:00 miod Exp $ */
+/* $OpenBSD: pxa2x0_gpio.c,v 1.24 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: pxa2x0_gpio.c,v 1.2 2003/07/15 00:24:55 lukem Exp $ */
/*
#endif /* PXAGPIO_HAS_GPION_INTRS */
}
- free(gh, M_DEVBUF);
+ free(gh, M_DEVBUF, 0);
}
#ifdef PXAGPIO_HAS_GPION_INTRS
-/* $OpenBSD: pxa2x0_i2s.c,v 1.7 2006/04/04 11:45:40 pascoe Exp $ */
+/* $OpenBSD: pxa2x0_i2s.c,v 1.8 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2005 Christopher Pascoe <pascoe@openbsd.org>
fail_map:
bus_dmamem_free(sc->sc_dmat, &p->seg, 1);
fail_alloc:
- free(p, type);
+ free(p, type, 0);
return 0;
}
bus_dmamem_free(sc->sc_dmat, &p->seg, 1);
*pp = p->next;
- free(p, type);
+ free(p, type, 0);
return;
}
-/* $OpenBSD: pxa2x0_intr.c,v 1.25 2014/05/08 21:17:00 miod Exp $ */
+/* $OpenBSD: pxa2x0_intr.c,v 1.26 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: pxa2x0_intr.c,v 1.5 2003/07/15 00:24:55 lukem Exp $ */
/*
psw = disable_interrupts(I32_bit);
TAILQ_REMOVE(&handler[irqno].list, ih, ih_list);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
pxa2x0_update_intr_masks();
-/* $OpenBSD: pxa2x0_lcd.c,v 1.25 2013/10/21 10:36:09 miod Exp $ */
+/* $OpenBSD: pxa2x0_lcd.c,v 1.26 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: pxa2x0_lcd.c,v 1.8 2003/10/03 07:24:05 bsh Exp $ */
/*
error = pxa2x0_lcd_new_screen(sc, scr, type->depth);
if (error != 0) {
- free(scr, M_DEVBUF);
+ free(scr, M_DEVBUF, 0);
return (error);
}
if (scr->nsegs > 0)
bus_dmamem_free(sc->dma_tag, scr->segs, scr->nsegs);
- free(scr, M_DEVBUF);
+ free(scr, M_DEVBUF, 0);
}
int
-/* $OpenBSD: intc.c,v 1.2 2013/11/06 19:03:07 syl Exp $ */
+/* $OpenBSD: intc.c,v 1.3 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
*
TAILQ_REMOVE(&intc_handler[irqno].iq_list, ih, ih_list);
if (ih->ih_name != NULL)
evcount_detach(&ih->ih_count);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
restore_interrupts(psw);
}
-/* $OpenBSD: omdisplay.c,v 1.4 2013/12/11 12:51:51 naddy Exp $ */
+/* $OpenBSD: omdisplay.c,v 1.5 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2007 Dale Rahn <drahn@openbsd.org>
*
error = omdisplay_new_screen(sc, scr, type->depth);
if (error != 0) {
- free(scr, M_DEVBUF);
+ free(scr, M_DEVBUF, 0);
return (error);
}
if (scr->nsegs > 0)
bus_dmamem_free(sc->sc_dma_tag, scr->segs, scr->nsegs);
- free(scr, M_DEVBUF);
+ free(scr, M_DEVBUF, 0);
}
int
-/* $OpenBSD: omgpio.c,v 1.3 2013/11/20 13:32:40 rapha Exp $ */
+/* $OpenBSD: omgpio.c,v 1.4 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
*
evcount_detach(&ih->ih_count);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
omgpio_intr_level(gpio, IST_NONE);
omgpio_intr_mask(gpio);
-/* $OpenBSD: a1xintc.c,v 1.3 2013/11/06 19:03:07 syl Exp $ */
+/* $OpenBSD: a1xintc.c,v 1.4 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
* Copyright (c) 2013 Artturi Alm
if (ih->ih_name != NULL)
evcount_detach(&ih->ih_count);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
er = bus_space_read_4(intc_iot, intc_ioh,
INTC_ENABLE_REG(IRQ2REG32(irq)));
-/* $OpenBSD: bus_dma.c,v 1.6 2014/07/11 09:36:26 mpi Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.7 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: bus_dma.c,v 1.2 2001/06/10 02:31:25 briggs Exp $ */
/*-
bus_dmamap_t map;
{
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: disksubr.c,v 1.58 2013/10/19 09:32:13 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.59 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2013 Miodrag Vallat.
}
done:
- free(vdit_storage, M_DEVBUF);
+ free(vdit_storage, M_DEVBUF, 0);
if (sbp != NULL) {
sbp->b_flags |= B_INVAL;
brelse(sbp);
-/* $OpenBSD: dma.c,v 1.1 2013/10/23 10:07:14 miod Exp $ */
+/* $OpenBSD: dma.c,v 1.2 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2013 Miodrag Vallat.
if (req->cbdone != NULL)
(*req->cbdone)(req->cbarg);
- free(req, M_DEVBUF);
+ free(req, M_DEVBUF, 0);
} else {
req->mem += req->lastcnt;
}
-/* $OpenBSD: vme.c,v 1.13 2014/05/08 22:17:33 miod Exp $ */
+/* $OpenBSD: vme.c,v 1.14 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2006, 2007, 2010 Miodrag Vallat.
*
void
vmebus_release_bst(struct device *vsc, bus_space_tag_t b)
{
- free((void *)b, M_DEVBUF);
+ free((void *)b, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: a2coff.c,v 1.11 2014/05/31 21:04:34 miod Exp $ */
+/* $OpenBSD: a2coff.c,v 1.12 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2006, 2013, Miodrag Vallat
*
last = n;
}
- free(phdr);
+ free(phdr, 0);
/*
* Fill ``data'' section.
-/* $OpenBSD: oaic.c,v 1.1 2013/10/16 16:59:34 miod Exp $ */
+/* $OpenBSD: oaic.c,v 1.2 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2010, 2013 Miodrag Vallat.
void
oaic_detach(void *cookie)
{
- free(cookie, sizeof(struct aic6250_softc));
+ free(cookie, sizeof(struct aic6250_softc), 0);
}
/*
-/* $OpenBSD: oosiop.c,v 1.4 2013/10/16 16:59:34 miod Exp $ */
+/* $OpenBSD: oosiop.c,v 1.5 2014/07/12 18:44:41 tedu Exp $ */
/* OpenBSD: oosiop.c,v 1.20 2013/10/09 18:22:06 miod Exp */
/* OpenBSD: oosiopvar.h,v 1.5 2011/04/03 12:42:36 krw Exp */
/* $NetBSD: oosiop.c,v 1.4 2003/10/29 17:45:55 tsutsui Exp $ */
{
struct oosiop_softc *sc = cookie;
- free(sc->sc_scr, sizeof(oosiop_script));
- free(sc, sizeof *sc);
+ free(sc->sc_scr, sizeof(oosiop_script), 0);
+ free(sc, sizeof *sc, 0);
}
static __inline void
-/* $OpenBSD: scsi.c,v 1.2 2013/10/16 16:59:34 miod Exp $ */
+/* $OpenBSD: scsi.c,v 1.3 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2013 Miodrag Vallat.
done:
if (priv->scsicookie == NULL) {
- free(priv, sizeof(struct scsi_private));
+ free(priv, sizeof(struct scsi_private), 0);
priv = NULL;
}
-/* $OpenBSD: sd.c,v 1.5 2013/10/16 16:59:34 miod Exp $ */
+/* $OpenBSD: sd.c,v 1.6 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2013 Miodrag Vallat.
priv = (struct scsi_private *)f->f_devdata;
if (priv->scsicookie != NULL)
(*priv->scsidetach)(priv->scsicookie);
- free(priv, sizeof(struct scsi_private));
+ free(priv, sizeof(struct scsi_private), 0);
f->f_devdata = NULL;
}
-/* $OpenBSD: vdmtool.c,v 1.2 2013/10/01 22:24:53 jmc Exp $ */
+/* $OpenBSD: vdmtool.c,v 1.3 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2013 Miodrag Vallat.
curbuf = append_vdit_portion(fd, secno, curbuf, sector,
first ? VDIT_BLOCK_HEAD_BE : VDIT_PORTION_HEADER_BLOCK);
if (curbuf == NULL) {
- free(buf);
+ free(buf, 0);
return NULL;
}
first = 0;
}
if (memcmp(vdit, vdit2, vditsize) != 0)
printf("VDIT and backup VDIT differ!\n");
- free(vdit2);
+ free(vdit2, 0);
}
- free(vdit);
+ free(vdit, 0);
}
}
-/* $OpenBSD: apic.c,v 1.14 2011/05/01 21:59:39 kettenis Exp $ */
+/* $OpenBSD: apic.c,v 1.15 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
aiv = malloc(sizeof(struct apic_iv), M_DEVBUF, M_NOWAIT);
if (aiv == NULL) {
- free(cnt, M_DEVBUF);
+ free(cnt, M_DEVBUF, 0);
return NULL;
}
cnt = malloc(sizeof(struct evcount), M_DEVBUF, M_NOWAIT);
if (!cnt) {
- free(aiv, M_DEVBUF);
+ free(aiv, M_DEVBUF, 0);
return (NULL);
}
-/* $OpenBSD: astro.c,v 1.14 2014/02/08 20:41:48 kettenis Exp $ */
+/* $OpenBSD: astro.c,v 1.15 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2007 Mark Kettenis
ims->ims_map.ipm_pagecnt);
#endif
- free(ims, M_DEVBUF);
+ free(ims, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: harmony.c,v 1.28 2013/05/15 08:29:23 ratchov Exp $ */
+/* $OpenBSD: harmony.c,v 1.29 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2003 Jason L. Wright (jason@thought.net)
fail2:
bus_dmamap_destroy(sc->sc_dmat, d->d_map);
fail1:
- free(d, pool);
+ free(d, pool, 0);
fail:
return (NULL);
}
bus_dmamem_unmap(sc->sc_dmat, d->d_kva, d->d_size);
bus_dmamem_free(sc->sc_dmat, &d->d_seg, 1);
bus_dmamap_destroy(sc->sc_dmat, d->d_map);
- free(d, pool);
+ free(d, pool, 0);
return;
}
printf("%s: free rogue pointer\n", sc->sc_dv.dv_xname);
-/* $OpenBSD: intr.c,v 1.43 2014/07/08 17:19:24 deraadt Exp $ */
+/* $OpenBSD: intr.c,v 1.44 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2002-2004 Michael Shalayeff
iv = &ivb[irq];
if (iv->handler) {
if (!pv->share) {
- free(cnt, M_DEVBUF);
+ free(cnt, M_DEVBUF, 0);
return (NULL);
} else {
iv = pv->share;
intr_more += 2 * CPU_NINTS;
for (ev = iv->next + CPU_NINTS; ev < intr_more; ev++)
ev->share = iv->share, iv->share = ev;
- free(cnt, M_DEVBUF);
+ free(cnt, M_DEVBUF, 0);
iv->cnt = NULL;
} else if (name == NULL) {
- free(cnt, M_DEVBUF);
+ free(cnt, M_DEVBUF, 0);
iv->cnt = NULL;
} else
evcount_attach(cnt, name, NULL);
iv->handler = nv->handler;
iv->arg = nv->arg;
iv->next = nv->next;
- free(nv, M_DEVBUF);
+ free(nv, M_DEVBUF, 0);
return;
} else {
iv->handler = NULL;
for (iv = &intr_table[irq]; iv; iv = iv->next) {
if (iv->next == cookie) {
iv->next = iv->next->next;
- free(cookie, M_DEVBUF);
+ free(cookie, M_DEVBUF, 0);
return;
}
}
-/* $OpenBSD: mainbus.c,v 1.84 2014/05/08 21:32:45 miod Exp $ */
+/* $OpenBSD: mainbus.c,v 1.85 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
if (map->dm_mapsize != 0)
mbus_dmamap_unload(v, map);
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: lf.c,v 1.8 2013/03/24 19:20:35 deraadt Exp $ */
+/* $OpenBSD: lf.c,v 1.9 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
int
lfclose(struct open_file *f)
{
- free(f->f_devdata, sizeof(struct hppa_dev));
+ free(f->f_devdata, sizeof(struct hppa_dev), 0);
f->f_devdata = NULL;
return 0;
}
-/* $OpenBSD: apic.c,v 1.6 2011/04/07 14:22:26 jsing Exp $ */
+/* $OpenBSD: apic.c,v 1.7 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
aiv = malloc(sizeof(struct apic_iv), M_DEVBUF, M_NOWAIT);
if (aiv == NULL) {
- free(cnt, M_DEVBUF);
+ free(cnt, M_DEVBUF, 0);
return NULL;
}
if (apic_intr_list[irq]) {
cnt = malloc(sizeof(struct evcount), M_DEVBUF, M_NOWAIT);
if (!cnt) {
- free(aiv, M_DEVBUF);
+ free(aiv, M_DEVBUF, 0);
return (NULL);
}
-/* $OpenBSD: astro.c,v 1.5 2011/04/07 15:30:15 miod Exp $ */
+/* $OpenBSD: astro.c,v 1.6 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2007 Mark Kettenis
ims->ims_map.ipm_pagecnt);
#endif
- free(ims, M_DEVBUF);
+ free(ims, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: autoconf.c,v 1.17 2013/10/04 18:46:07 kettenis Exp $ */
+/* $OpenBSD: autoconf.c,v 1.18 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 1998-2005 Michael Shalayeff
if ((err = pdc_call((iodcio_t)pdc, 0, PDC_PAT_IO,
PDC_PAT_IO_GET_PCI_RT, rt, cell))) {
printf("irt fetch error %d\n", err);
- free(rt, M_DEVBUF);
+ free(rt, M_DEVBUF, 0);
return (NULL);
}
} else if ((err = pdc_call((iodcio_t)pdc, 0, PDC_PCI_INDEX,
PDC_PCI_GET_INT_TBL, &pdc_pat_io_num, cpu_gethpa(0), pdc_rt))) {
printf("irt fetch error %d\n", err);
- free(rt, M_DEVBUF);
+ free(rt, M_DEVBUF, 0);
return (NULL);
}
bcopy(pdc_rt, rt, num * sizeof(*rt));
-/* $OpenBSD: intr.c,v 1.9 2014/07/08 17:19:24 deraadt Exp $ */
+/* $OpenBSD: intr.c,v 1.10 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2002-2004 Michael Shalayeff
iv = &ivb[irq];
if (iv->handler) {
if (!pv->share) {
- free(cnt, M_DEVBUF);
+ free(cnt, M_DEVBUF, 0);
return (NULL);
} else {
iv = pv->share;
iv->handler = nv->handler;
iv->arg = nv->arg;
iv->next = nv->next;
- free(nv, M_DEVBUF);
+ free(nv, M_DEVBUF, 0);
return;
} else {
iv->handler = NULL;
for (iv = &intr_table[irq]; iv; iv = iv->next) {
if (iv->next == cookie) {
iv->next = iv->next->next;
- free(cookie, M_DEVBUF);
+ free(cookie, M_DEVBUF, 0);
return;
}
}
-/* $OpenBSD: mainbus.c,v 1.14 2014/04/08 09:34:23 mpi Exp $ */
+/* $OpenBSD: mainbus.c,v 1.15 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
if (map->dm_mapsize != 0)
mbus_dmamap_unload(v, map);
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: lf.c,v 1.2 2013/03/24 19:20:35 deraadt Exp $ */
+/* $OpenBSD: lf.c,v 1.3 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
int
lfclose(struct open_file *f)
{
- free(f->f_devdata, sizeof(struct hppa_dev));
+ free(f->f_devdata, sizeof(struct hppa_dev), 0);
f->f_devdata = NULL;
return 0;
}
-/* $OpenBSD: bus_dma.c,v 1.31 2014/07/11 14:41:00 mpi Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.32 2014/07/12 18:44:41 tedu Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
* All rights reserved.
_bus_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
{
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: esm.c,v 1.54 2013/07/04 16:55:18 sf Exp $ */
+/* $OpenBSD: esm.c,v 1.55 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
s = malloc(sizeof(struct ksensor) * nsensors, M_DEVBUF,
M_NOWAIT|M_ZERO);
if (s == NULL) {
- free(es, M_DEVBUF);
+ free(es, M_DEVBUF, 0);
return;
}
s = malloc(sizeof(struct ksensor) * nsensors, M_DEVBUF,
M_NOWAIT|M_ZERO);
if (s == NULL) {
- free(es, M_DEVBUF);
+ free(es, M_DEVBUF, 0);
return;
}
case ESM_S_VOLTS:
case ESM_S_VOLTSx10:
if (esm_thresholds(sc, devmap, es) != 0) {
- free(es, M_DEVBUF);
+ free(es, M_DEVBUF, 0);
continue;
}
/* FALLTHROUGH */
s = malloc(sizeof(struct ksensor), M_DEVBUF,
M_NOWAIT|M_ZERO);
if (s == NULL) {
- free(es, M_DEVBUF);
+ free(es, M_DEVBUF, 0);
return;
}
-/* $OpenBSD: est.c,v 1.42 2014/05/23 03:30:41 guenther Exp $ */
+/* $OpenBSD: est.c,v 1.43 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2003 Michael Eriksson.
* All rights reserved.
return acpilist;
notable:
- free(acpilist, M_DEVBUF);
+ free(acpilist, M_DEVBUF, 0);
acpilist = NULL;
nolist:
return NULL;
M_DEVBUF, M_NOWAIT)) == NULL) {
printf("est_acpi_pss_changed: cannot allocate memory for new "
"operating points");
- free(acpilist, M_DEVBUF);
+ free(acpilist, M_DEVBUF, 0);
return;
}
needtran = 0;
}
- free(est_fqlist->table, M_DEVBUF);
- free(est_fqlist, M_DEVBUF);
+ free(est_fqlist->table, M_DEVBUF, 0);
+ free(est_fqlist, M_DEVBUF, 0);
est_fqlist = acpilist;
if (needtran) {
if ((fake_table = malloc(sizeof(struct est_op) * 3, M_DEVBUF,
M_NOWAIT)) == NULL) {
- free(fake_fqlist, M_DEVBUF);
+ free(fake_fqlist, M_DEVBUF, 0);
printf("%s: EST: cannot allocate memory for fake "
"table\n", cpu_device);
return;
* While est_fqlist can point into the static est_cpus[],
* it can't fail in that case and therefore can't reach here.
*/
- free(est_fqlist->table, M_DEVBUF);
- free(est_fqlist, M_DEVBUF);
+ free(est_fqlist->table, M_DEVBUF, 0);
+ free(est_fqlist, M_DEVBUF, 0);
}
void
-/* $OpenBSD: ioapic.c,v 1.30 2013/10/01 20:22:11 sf Exp $ */
+/* $OpenBSD: ioapic.c,v 1.31 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: ioapic.c,v 1.7 2003/07/14 22:32:40 lukem Exp $ */
/*-
/*printf("%s: intr_establish: can't share %s with %s, irq %d\n",
ih_what, isa_intr_typename(pin->ip_type),
isa_intr_typename(type), intr);*/
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
return (NULL);
}
break;
apic_vectorset(sc, intr, minlevel, maxlevel);
evcount_detach(&ih->ih_count);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
}
void
-/* $OpenBSD: k1x-pstate.c,v 1.5 2013/10/05 18:47:05 brynet Exp $ */
+/* $OpenBSD: k1x-pstate.c,v 1.6 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2011 Bryan Steele <brynet@gmail.com>
*
setperf_prio = 1;
return;
}
- free(cstate, M_DEVBUF);
+ free(cstate, M_DEVBUF, 0);
}
/* $NetBSD: mem.c,v 1.31 1996/05/03 19:42:19 christos Exp $ */
-/* $OpenBSD: mem.c,v 1.38 2013/12/19 21:30:02 deraadt Exp $ */
+/* $OpenBSD: mem.c,v 1.39 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1982, 1986, 1990, 1993
if (!error)
error = copyout(md, mo->mo_desc,
nd * sizeof(struct mem_range_desc));
- free(md, M_MEMDESC);
+ free(md, M_MEMDESC, 0);
} else {
nd = mem_range_softc.mr_ndesc;
}
md->mr_owner[sizeof(md->mr_owner) - 1] = 0;
if (error == 0)
error = mem_range_attr_set(md, &mo->mo_arg[0]);
- free(md, M_MEMDESC);
+ free(md, M_MEMDESC, 0);
break;
}
return (error);
-/* $OpenBSD: powernow-k7.c,v 1.34 2010/04/20 22:05:41 tedu Exp $ */
+/* $OpenBSD: powernow-k7.c,v 1.35 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2004 Martin Végiard.
setperf_prio = 1;
return;
}
- free(cstate, M_DEVBUF);
+ free(cstate, M_DEVBUF, 0);
}
-/* $OpenBSD: powernow-k8.c,v 1.26 2010/04/20 22:05:41 tedu Exp $ */
+/* $OpenBSD: powernow-k8.c,v 1.27 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2004 Martin Végiard.
setperf_prio = 1;
return;
}
- free(cstate, M_DEVBUF);
+ free(cstate, M_DEVBUF, 0);
}
-/* $OpenBSD: softintr.c,v 1.4 2009/04/19 19:13:57 oga Exp $ */
+/* $OpenBSD: softintr.c,v 1.5 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: softintr.c,v 1.1 2003/02/26 21:26:12 fvdl Exp $ */
/*-
}
mtx_leave(&si->softintr_lock);
- free(sih, M_DEVBUF);
+ free(sih, M_DEVBUF, 0);
}
-/* $OpenBSD: sys_machdep.c,v 1.31 2011/11/07 15:41:33 guenther Exp $ */
+/* $OpenBSD: sys_machdep.c,v 1.32 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: sys_machdep.c,v 1.28 1996/05/03 19:42:29 christos Exp $ */
/*-
if (ua.start > nldt) {
simple_unlock(&pmap->pm_lock);
- free(cp, M_TEMP);
+ free(cp, M_TEMP, 0);
return (EINVAL);
}
if (error == 0)
*retval = num;
- free(cp, M_TEMP);
+ free(cp, M_TEMP, 0);
return (error);
}
*retval = ua.start;
out:
- free(descv, M_TEMP);
+ free(descv, M_TEMP, 0);
return (error);
}
#endif /* USER_LDT */
-/* $OpenBSD: via.c,v 1.31 2014/03/29 18:09:29 guenther Exp $ */
+/* $OpenBSD: via.c,v 1.32 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
vc3_sc->sc_cid = crypto_get_driverid(0);
if (vc3_sc->sc_cid < 0) {
- free(vc3_sc, M_DEVBUF);
+ free(vc3_sc, M_DEVBUF, 0);
return; /* YYY bitch? */
}
return (ENOMEM);
bcopy(sc->sc_sessions, ses, sesn * sizeof(*ses));
explicit_bzero(sc->sc_sessions, sesn * sizeof(*ses));
- free(sc->sc_sessions, M_DEVBUF);
+ free(sc->sc_sessions, M_DEVBUF, 0);
sc->sc_sessions = ses;
ses = &sc->sc_sessions[sesn];
sc->sc_nsessions++;
if (swd->sw_ictx) {
explicit_bzero(swd->sw_ictx, axf->ctxsize);
- free(swd->sw_ictx, M_CRYPTO_DATA);
+ free(swd->sw_ictx, M_CRYPTO_DATA, 0);
}
if (swd->sw_octx) {
explicit_bzero(swd->sw_octx, axf->ctxsize);
- free(swd->sw_octx, M_CRYPTO_DATA);
+ free(swd->sw_octx, M_CRYPTO_DATA, 0);
}
- free(swd, M_CRYPTO_DATA);
+ free(swd, M_CRYPTO_DATA, 0);
}
explicit_bzero(&sc->sc_sessions[sesn], sizeof(sc->sc_sessions[sesn]));
if (sc->op_buf != NULL) {
explicit_bzero(sc->op_buf, crd->crd_len);
- free(sc->op_buf, M_DEVBUF);
+ free(sc->op_buf, M_DEVBUF, 0);
sc->op_buf = NULL;
}
-/* $OpenBSD: isa_machdep.c,v 1.75 2013/07/14 18:22:08 kettenis Exp $ */
+/* $OpenBSD: isa_machdep.c,v 1.76 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: isa_machdep.c,v 1.22 1997/06/12 23:57:32 thorpej Exp $ */
/*-
if (!LEGAL_IRQ(irq) || type == IST_NONE) {
printf("%s: isa_intr_establish: bogus irq or type\n", ih_what);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
return (NULL);
}
switch (intrtype[irq]) {
/*printf("%s: intr_establish: can't share %s with %s, irq %d\n",
ih_what, isa_intr_typename(intrtype[irq]),
isa_intr_typename(type), irq);*/
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
return (NULL);
}
break;
else
panic("intr_disestablish: handler not registered");
evcount_detach(&ih->ih_count);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
intr_calculatemasks();
out:
if (error) {
if (map->_dm_cookie != NULL)
- free(map->_dm_cookie, M_DEVBUF);
+ free(map->_dm_cookie, M_DEVBUF, 0);
_bus_dmamap_destroy(t, map);
}
return (error);
if (cookie->id_flags & ID_HAS_BOUNCE)
_isa_dma_free_bouncebuf(t, map);
- free(cookie, M_DEVBUF);
+ free(cookie, M_DEVBUF, 0);
_bus_dmamap_destroy(t, map);
}
-/* $OpenBSD: agp_machdep.c,v 1.17 2014/04/01 09:05:03 mpi Exp $ */
+/* $OpenBSD: agp_machdep.c,v 1.18 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2008 - 2009 Owain G. Ainsworth <oga@openbsd.org>
if (extent_free(ex, map->addr, map->size,
EX_NOWAIT | EX_MALLOCOK ))
printf("agp_destroy_map: can't free region\n");
- free(map, M_AGP);
+ free(map, M_AGP, 0);
}
-/* $OpenBSD: glxsb.c,v 1.27 2013/10/29 21:44:50 mikeb Exp $ */
+/* $OpenBSD: glxsb.c,v 1.28 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2006 Tom Cosgrove <tom@openbsd.org>
if (sesn != 0) {
bcopy(sc->sc_sessions, ses, sesn * sizeof(*ses));
explicit_bzero(sc->sc_sessions, sesn * sizeof(*ses));
- free(sc->sc_sessions, M_DEVBUF);
+ free(sc->sc_sessions, M_DEVBUF, 0);
}
sc->sc_sessions = ses;
ses = &sc->sc_sessions[sesn];
if (swd->sw_kschedule) {
explicit_bzero(swd->sw_kschedule, txf->ctxsize);
- free(swd->sw_kschedule, M_CRYPTO_DATA);
+ free(swd->sw_kschedule, M_CRYPTO_DATA, 0);
}
- free(swd, M_CRYPTO_DATA);
+ free(swd, M_CRYPTO_DATA, 0);
}
if ((swd = sc->sc_sessions[sesn].ses_swd_auth)) {
axf = swd->sw_axf;
if (swd->sw_ictx) {
explicit_bzero(swd->sw_ictx, axf->ctxsize);
- free(swd->sw_ictx, M_CRYPTO_DATA);
+ free(swd->sw_ictx, M_CRYPTO_DATA, 0);
}
if (swd->sw_octx) {
explicit_bzero(swd->sw_octx, axf->ctxsize);
- free(swd->sw_octx, M_CRYPTO_DATA);
+ free(swd->sw_octx, M_CRYPTO_DATA, 0);
}
- free(swd, M_CRYPTO_DATA);
+ free(swd, M_CRYPTO_DATA, 0);
}
explicit_bzero(&sc->sc_sessions[sesn], sizeof(sc->sc_sessions[sesn]));
return (0);
-/* $OpenBSD: pci_machdep.c,v 1.78 2014/04/19 11:53:42 kettenis Exp $ */
+/* $OpenBSD: pci_machdep.c,v 1.79 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: pci_machdep.c,v 1.28 1997/06/06 23:29:17 thorpej Exp $ */
/*-
idt_vec_free(ih->ih_vec);
evcount_detach(&ih->ih_count);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
return;
}
-/* $OpenBSD: pcibios.c,v 1.44 2014/03/29 18:09:29 guenther Exp $ */
+/* $OpenBSD: pcibios.c,v 1.45 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: pcibios.c,v 1.5 2000/08/01 05:23:59 uch Exp $ */
/*
&pcibios_pir_header.exclusive_irq) != PCIBIOS_SUCCESS) {
printf("%s: PCI IRQ Routing information unavailable.\n",
sc->sc_dev.dv_xname);
- free(pcibios_pir_table, M_DEVBUF);
+ free(pcibios_pir_table, M_DEVBUF, 0);
pcibios_pir_table = NULL;
pcibios_pir_table_nentries = 0;
return NULL;
-/* $OpenBSD: piix.c,v 1.9 2008/06/26 05:42:11 ray Exp $ */
+/* $OpenBSD: piix.c,v 1.10 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: piix.c,v 1.1 1999/11/17 01:21:20 thorpej Exp $ */
/*-
if (bus_space_map(iot, PIIX_REG_ELCR, PIIX_REG_ELCR_SIZE, 0,
&ph->ph_elcr_ioh) != 0) {
- free(ph, M_DEVBUF);
+ free(ph, M_DEVBUF, 0);
return (1);
}
-/* $OpenBSD: rccosb4.c,v 1.4 2005/11/23 09:24:57 mickey Exp $ */
+/* $OpenBSD: rccosb4.c,v 1.5 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2004,2005 Michael Shalayeff
ph->piix.ph_tag = tag;
if (bus_space_map(iot, OSB4_PIAIR, 2, 0, &ph->osb4_ioh)) {
- free(ph, M_DEVBUF);
+ free(ph, M_DEVBUF, 0);
return (1);
}
if (bus_space_map(iot, OSB4_REG_ELCR, 2, 0, &ph->piix.ph_elcr_ioh)) {
- free(ph, M_DEVBUF);
+ free(ph, M_DEVBUF, 0);
return (1);
}
-/* $OpenBSD: vga_post.c,v 1.6 2014/04/08 09:02:51 mpi Exp $ */
+/* $OpenBSD: vga_post.c,v 1.7 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: vga_post.c,v 1.12 2009/03/15 21:32:36 cegger Exp $ */
/*-
&sc->ram_backing, BASE_MEMORY/PAGE_SIZE, UVM_PLA_WAITOK);
if (err) {
uvm_km_free(kernel_map, sc->sys_image, 1024 * 1024);
- free(sc, M_DEVBUF);
+ free(sc, M_DEVBUF, 0);
return NULL;
}
uvm_km_free(kernel_map, sc->sys_image, 1024 * 1024);
pmap_update(pmap_kernel());
- free(sc, M_DEVBUF);
+ free(sc, M_DEVBUF, 0);
}
#ifdef DDB
-/* $OpenBSD: diskprobe.c,v 1.37 2013/11/05 15:17:56 krw Exp $ */
+/* $OpenBSD: diskprobe.c,v 1.38 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
if (debug)
printf(" <!fd%u>", i);
#endif
- free(dip, 0);
+ free(dip, 0, 0);
break;
}
if (debug)
printf(" <!hd%u>", i&0x7f);
#endif
- free(dip, 0);
+ free(dip, 0, 0);
break;
}
#if 0
if (bios_getdiskinfo(cddev, &dip->bios_info)) {
printf(" <!cd0>"); /* XXX */
- free(dip, 0);
+ free(dip, 0, 0);
return;
}
#endif
-/* $OpenBSD: softraid.c,v 1.6 2013/12/28 02:40:41 jsing Exp $ */
+/* $OpenBSD: softraid.c,v 1.7 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2012 Joel Sing <jsing@openbsd.org>
}
explicit_bzero(md, SR_META_SIZE * 512);
- free(md, 0);
+ free(md, 0, 0);
}
int
continue;
if (bv->sbv_keys != NULL) {
explicit_bzero(bv->sbv_keys, SR_CRYPTO_KEYBLOCK_BYTES);
- free(bv->sbv_keys, 0);
+ free(bv->sbv_keys, 0, 0);
bv->sbv_keys = NULL;
}
if (bv->sbv_maskkey != NULL) {
explicit_bzero(bv->sbv_maskkey, SR_CRYPTO_MAXKEYBYTES);
- free(bv->sbv_maskkey, 0);
+ free(bv->sbv_maskkey, 0, 0);
bv->sbv_maskkey = NULL;
}
}
SLIST_FOREACH(kd, &sr_keydisks, kd_link) {
explicit_bzero(kd, sizeof(*kd));
- free(kd, 0);
+ free(kd, 0, 0);
}
}
if (keys != NULL && rv != 0) {
explicit_bzero(keys, SR_CRYPTO_KEYBLOCK_BYTES);
- free(keys, 0);
+ free(keys, 0, 0);
}
return (rv);
-/* $OpenBSD: bus_dma.c,v 1.10 2014/07/11 09:36:26 mpi Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.11 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: bus_dma.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
/*
DPRINTF(("bus_dmamap_destroy: t = %p, map = %p\n", t, map));
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
static inline int
-/* $OpenBSD: intr.c,v 1.8 2014/03/29 18:09:29 guenther Exp $ */
+/* $OpenBSD: intr.c,v 1.9 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: intr.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
/*-
evcount_detach(&ih->ih_count);
#endif
- free((void *)ih, M_DEVBUF);
+ free((void *)ih, M_DEVBUF, 0);
if (--eih->eih_nih == 0) {
intc_intr_disestablish(eih->eih_func);
-/* $OpenBSD: bonito.c,v 1.26 2014/05/24 21:11:01 miod Exp $ */
+/* $OpenBSD: bonito.c,v 1.27 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: bonito_mainbus.c,v 1.11 2008/04/28 20:23:10 martin Exp $ */
/* $NetBSD: bonito_pci.c,v 1.5 2008/04/28 20:23:28 martin Exp $ */
splx(s);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
}
/*
out:
if (exname != NULL)
- free(exname, M_DEVBUF);
+ free(exname, M_DEVBUF, 0);
return ex;
}
-/* $OpenBSD: bus_dma.c,v 1.14 2014/07/11 09:36:26 mpi Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.15 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
void
_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
{
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: dev.c,v 1.5 2013/06/11 16:42:09 deraadt Exp $ */
+/* $OpenBSD: dev.c,v 1.6 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2010 Miodrag Vallat.
if (f->f_devdata != NULL) {
pi = (struct pmon_iodata *)f->f_devdata;
rc = pmon_close(pi->fd);
- free(pi, sizeof *pi);
+ free(pi, sizeof *pi, 0);
f->f_devdata = NULL;
} else
rc = 0;
-/* $OpenBSD: sd.c,v 1.3 2013/10/29 21:49:07 miod Exp $ */
+/* $OpenBSD: sd.c,v 1.4 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: sd.c,v 1.5 2013/01/22 15:48:40 tsutsui Exp $ */
/*
{
struct sd_softc *sc = f->f_devdata;
- free(sc, sizeof *sc);
+ free(sc, sizeof *sc, 0);
f->f_devdata = NULL;
return 0;
-/* $OpenBSD: softintr.c,v 1.3 2014/07/08 17:42:50 miod Exp $ */
+/* $OpenBSD: softintr.c,v 1.4 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: softintr.c,v 1.2 2003/07/15 00:24:39 lukem Exp $ */
/*
}
mtx_leave(&siq->siq_mtx);
- free(sih, M_DEVBUF);
+ free(sih, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: awacs.c,v 1.28 2013/05/15 08:29:23 ratchov Exp $ */
+/* $OpenBSD: awacs.c,v 1.29 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: awacs.c,v 1.4 2001/02/26 21:07:51 wiz Exp $ */
/*-
1, &p->nsegs, flags)) != 0) {
printf("%s: unable to allocate dma, error = %d\n",
sc->sc_dev.dv_xname, error);
- free(p, type);
+ free(p, type, 0);
return NULL;
}
printf("%s: unable to map dma, error = %d\n",
sc->sc_dev.dv_xname, error);
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
- free(p, type);
+ free(p, type, 0);
return NULL;
}
sc->sc_dev.dv_xname, error);
bus_dmamem_unmap(sc->sc_dmat, p->addr, size);
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
- free(p, type);
+ free(p, type, 0);
return NULL;
}
bus_dmamap_destroy(sc->sc_dmat, p->map);
bus_dmamem_unmap(sc->sc_dmat, p->addr, size);
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
- free(p, type);
+ free(p, type, 0);
return NULL;
}
-/* $OpenBSD: dbdma.c,v 1.9 2007/09/17 01:33:33 krw Exp $ */
+/* $OpenBSD: dbdma.c,v 1.10 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: dbdma.c,v 1.2 1998/08/21 16:13:28 tsubai Exp $ */
/*
bus_dmamem_unmap(dt->d_dmat, (caddr_t)dt->d_addr, dt->d_size);
if (dt->d_nsegs)
bus_dmamem_free(dt->d_dmat, dt->d_segs, dt->d_nsegs);
- free(dt, M_DEVBUF);
+ free(dt, M_DEVBUF, 0);
}
-/* $OpenBSD: i2s.c,v 1.23 2013/05/15 08:29:23 ratchov Exp $ */
+/* $OpenBSD: i2s.c,v 1.24 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: i2s.c,v 1.1 2003/12/27 02:19:34 grant Exp $ */
/*-
1, &p->nsegs, flags)) != 0) {
printf("%s: unable to allocate dma, error = %d\n",
sc->sc_dev.dv_xname, error);
- free(p, type);
+ free(p, type, 0);
return NULL;
}
printf("%s: unable to map dma, error = %d\n",
sc->sc_dev.dv_xname, error);
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
- free(p, type);
+ free(p, type, 0);
return NULL;
}
sc->sc_dev.dv_xname, error);
bus_dmamem_unmap(sc->sc_dmat, p->addr, size);
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
- free(p, type);
+ free(p, type, 0);
return NULL;
}
bus_dmamap_destroy(sc->sc_dmat, p->map);
bus_dmamem_unmap(sc->sc_dmat, p->addr, size);
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
- free(p, type);
+ free(p, type, 0);
return NULL;
}
-/* $OpenBSD: macintr.c,v 1.46 2014/04/01 20:27:14 mpi Exp $ */
+/* $OpenBSD: macintr.c,v 1.47 2014/07/12 18:44:42 tedu Exp $ */
/*-
* Copyright (c) 2008 Dale Rahn <drahn@openbsd.org>
ppc_intr_enable(s);
evcount_detach(&ih->ih_count);
- free((void *)ih, M_DEVBUF);
+ free((void *)ih, M_DEVBUF, 0);
if (TAILQ_EMPTY(&iq->iq_list))
iq->iq_ist = IST_NONE;
-/* $OpenBSD: openpic.c,v 1.71 2014/04/01 20:27:14 mpi Exp $ */
+/* $OpenBSD: openpic.c,v 1.72 2014/07/12 18:44:42 tedu Exp $ */
/*-
* Copyright (c) 2008 Dale Rahn <drahn@openbsd.org>
ppc_intr_enable(s);
evcount_detach(&ih->ih_count);
- free((void *)ih, M_DEVBUF);
+ free((void *)ih, M_DEVBUF, 0);
if (TAILQ_EMPTY(&iq->iq_list))
iq->iq_ist = IST_NONE;
-/* $OpenBSD: dma.c,v 1.39 2014/07/11 09:36:26 mpi Exp $ */
+/* $OpenBSD: dma.c,v 1.40 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
{
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
-/* $OpenBSD: mainbus.c,v 1.22 2014/07/02 15:34:43 tobiasu Exp $ */
+/* $OpenBSD: mainbus.c,v 1.23 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
slen = strlen(t) + strlen(name) - 3;
if ((hw_prod = malloc(slen, M_DEVBUF, M_NOWAIT)) != NULL) {
snprintf(hw_prod, slen, "%s %s", t, name + 5);
- free(t, M_DEVBUF);
+ free(t, M_DEVBUF, 0);
}
} else {
/* New World Macintosh or Unknown */
-/* $OpenBSD: mem.c,v 1.17 2011/11/10 17:30:32 krw Exp $ */
+/* $OpenBSD: mem.c,v 1.18 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: mem.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */
/*
}
/* No need to keep the "dimm-info" contents around. */
- free(sc->sc_buf, M_DEVBUF);
+ free(sc->sc_buf, M_DEVBUF, 0);
sc->sc_len = -1;
}
}
-/* $OpenBSD: openprom.c,v 1.2 2011/06/17 07:06:46 mk Exp $ */
+/* $OpenBSD: openprom.c,v 1.3 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: openprom.c,v 1.4 2002/01/10 06:21:53 briggs Exp $ */
/*
}
if (name)
- free(name, M_TEMP);
+ free(name, M_TEMP, 0);
if (value)
- free(value, M_TEMP);
+ free(value, M_TEMP, 0);
return (error);
}
-/* $OpenBSD: softintr.c,v 1.16 2014/07/08 17:19:25 deraadt Exp $ */
+/* $OpenBSD: softintr.c,v 1.17 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: softintr.c,v 1.2 2003/07/15 00:24:39 lukem Exp $ */
/*
}
mtx_leave(&siq->siq_mtx);
- free(sih, M_DEVBUF);
+ free(sih, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: octcf.c,v 1.14 2014/05/10 22:25:16 jasper Exp $ */
+/* $OpenBSD: octcf.c,v 1.15 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */
/*
lp = malloc(sizeof(*lp), M_TEMP, M_WAITOK);
octcfgetdisklabel(dev, wd, lp, 0);
bcopy(lp, wd->sc_dk.dk_label, sizeof(*lp));
- free(lp, M_TEMP);
+ free(lp, M_TEMP, 0);
goto exit;
case DIOCGPDINFO:
if (error != 0) {
printf("%s: identify failed: %d\n", __func__, error);
- free(tb, M_DEVBUF);
+ free(tb, M_DEVBUF, 0);
return CMD_ERR;
} else {
#if BYTE_ORDER == BIG_ENDIAN
prms->atap_model[1] == 'E') ||
(prms->atap_model[0] == 'F' &&
prms->atap_model[1] == 'X'))) {
- free(tb, M_DEVBUF);
+ free(tb, M_DEVBUF, 0);
return CMD_OK;
}
for (i = 0; i < sizeof(prms->atap_model); i += 2) {
*p = swap16(*p);
}
- free(tb, M_DEVBUF);
+ free(tb, M_DEVBUF, 0);
return CMD_OK;
}
}
-/* $OpenBSD: octeon_pcibus.c,v 1.14 2014/05/11 09:23:49 jasper Exp $ */
+/* $OpenBSD: octeon_pcibus.c,v 1.15 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: bonito_mainbus.c,v 1.11 2008/04/28 20:23:10 martin Exp $ */
/* $NetBSD: bonito_pci.c,v 1.5 2008/04/28 20:23:28 martin Exp $ */
out:
if (exname != NULL)
- free(exname, M_DEVBUF);
+ free(exname, M_DEVBUF, 0);
return ex;
}
-/* $OpenBSD: bus_dma.c,v 1.11 2014/07/11 09:36:26 mpi Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.12 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
void
_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
{
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: softintr.c,v 1.5 2014/07/03 07:02:10 matthieu Exp $ */
+/* $OpenBSD: softintr.c,v 1.6 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: softintr.c,v 1.2 2003/07/15 00:24:39 lukem Exp $ */
/*
}
mtx_leave(&siq->siq_mtx);
- free(sih, M_DEVBUF);
+ free(sih, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: impact.c,v 1.5 2013/10/21 10:36:16 miod Exp $ */
+/* $OpenBSD: impact.c,v 1.6 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2010, 2012 Miodrag Vallat.
impact_setup(scr, has_hq4);
if (impact_init_screen(scr) != 0) {
printf("failed to allocate memory\n");
- free(scr, M_DEVBUF);
+ free(scr, M_DEVBUF, 0);
return ENOMEM;
}
}
-/* $OpenBSD: spdmem_mainbus.c,v 1.1 2010/03/22 21:22:08 miod Exp $ */
+/* $OpenBSD: spdmem_mainbus.c,v 1.2 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2010 Miodrag Vallat.
rc = l1_get_brick_spd_record(saa->maa.maa_nasid, saa->dimm,
&spd, &spdlen);
if (rc == 0) {
- free(spd, M_DEVBUF);
+ free(spd, M_DEVBUF, 0);
return 1;
} else
return 0;
spdmem_attach_common(&sc->sc_base);
/* free record, as it won't be accessed anymore */
sc->sc_spdlen = 0;
- free(sc->sc_spd, M_DEVBUF);
+ free(sc->sc_spd, M_DEVBUF, 0);
}
uint8_t
-/* $OpenBSD: grtwo.c,v 1.9 2014/03/29 13:01:31 miod Exp $ */
+/* $OpenBSD: grtwo.c,v 1.10 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: grtwo.c,v 1.11 2009/11/22 19:09:15 mbalmer Exp $ */
/*
goto out;
if (grtwo_attach_common(dc, ga) != 0) {
printf("\n%s: not responding\n", self->dv_xname);
- free(dc, M_DEVBUF);
+ free(dc, M_DEVBUF, 0);
return;
}
if (grtwo_init_screen(dc, M_WAITOK | M_CANFAIL) != 0) {
- free(dc, M_DEVBUF);
+ free(dc, M_DEVBUF, 0);
goto out;
}
#endif
-/* $OpenBSD: newport.c,v 1.8 2013/10/21 10:36:17 miod Exp $ */
+/* $OpenBSD: newport.c,v 1.9 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: newport.c,v 1.15 2009/05/12 23:51:25 macallan Exp $ */
/*
if (fail) {
printf("%s: failed to initialize screen\n", self->dv_xname);
- free(dc, M_DEVBUF);
+ free(dc, M_DEVBUF, 0);
return;
}
-/* $OpenBSD: bus_dma.c,v 1.35 2014/07/11 09:36:26 mpi Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.36 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
void
_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
{
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: eisa_machdep.c,v 1.2 2012/04/15 20:44:52 miod Exp $ */
+/* $OpenBSD: eisa_machdep.c,v 1.3 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2012 Miodrag Vallat.
}
evcount_detach(&eih->ei_evcnt);
- free(eih, M_DEVBUF);
+ free(eih, M_DEVBUF, 0);
}
int
-/* $OpenBSD: ip27_machdep.c,v 1.60 2014/07/12 14:12:44 uebayasi Exp $ */
+/* $OpenBSD: ip27_machdep.c,v 1.61 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2008, 2009 Miodrag Vallat.
splx(s);
if (ISSET(ih->ih_flags, IH_ALLOCATED))
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
}
void
-/* $OpenBSD: l1.c,v 1.7 2011/03/12 23:43:19 miod Exp $ */
+/* $OpenBSD: l1.c,v 1.8 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
fail:
if (ia != NULL)
- free(ia, M_DEVBUF);
+ free(ia, M_DEVBUF, 0);
return rc;
}
enaddr_aton(hexaddr, enaddr);
out:
- free(ia, M_DEVBUF);
+ free(ia, M_DEVBUF, 0);
return rc;
}
fail:
if (spd != NULL)
- free(spd, M_DEVBUF);
+ free(spd, M_DEVBUF, 0);
return rc;
}
-/* $OpenBSD: diskio.c,v 1.7 2012/03/19 17:38:31 miod Exp $ */
+/* $OpenBSD: diskio.c,v 1.8 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2000 Opsycon AB (www.opsycon.se)
dioclose(struct open_file *f)
{
Bios_Close(((struct dio_softc *)f->f_devdata)->sc_fd);
- free(f->f_devdata, sizeof(struct dio_softc));
+ free(f->f_devdata, sizeof(struct dio_softc), 0);
f->f_devdata = NULL;
return (0);
}
-/* $OpenBSD: sgivol.c,v 1.21 2013/11/13 07:16:18 deraadt Exp $ */
+/* $OpenBSD: sgivol.c,v 1.22 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: sgivol.c,v 1.8 2003/11/08 04:59:00 sekiya Exp $ */
/*-
i -= fsize;
}
fclose(fp);
- free(fbuf);
+ free(fbuf, 0);
}
void
-/* $OpenBSD: xbridge.c,v 1.89 2014/05/19 21:18:42 miod Exp $ */
+/* $OpenBSD: xbridge.c,v 1.90 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2008, 2009, 2011 Miodrag Vallat.
return;
fail2:
- free(xb->xb_dmat, M_DEVBUF);
+ free(xb->xb_dmat, M_DEVBUF, 0);
fail1:
if (xb->xb_io_bus_space_sw != NULL)
- free(xb->xb_io_bus_space_sw, M_DEVBUF);
+ free(xb->xb_io_bus_space_sw, M_DEVBUF, 0);
if (xb->xb_io_bus_space != NULL)
- free(xb->xb_io_bus_space, M_DEVBUF);
+ free(xb->xb_io_bus_space, M_DEVBUF, 0);
if (xb->xb_mem_bus_space_sw != NULL)
- free(xb->xb_mem_bus_space_sw, M_DEVBUF);
+ free(xb->xb_mem_bus_space_sw, M_DEVBUF, 0);
if (xb->xb_mem_bus_space != NULL)
- free(xb->xb_mem_bus_space, M_DEVBUF);
+ free(xb->xb_mem_bus_space, M_DEVBUF, 0);
if (errmsg == NULL)
errmsg = "not enough memory to build bus access structures";
printf("%s\n", errmsg);
LIST_INIT(&xi->xi_handlers);
if (xbow_intr_register(xb->xb_widget, level, &intrsrc) != 0) {
- free(xi, M_DEVBUF);
+ free(xi, M_DEVBUF, 0);
return NULL;
}
*/
}
- free(xih, M_DEVBUF);
+ free(xih, M_DEVBUF, 0);
}
int
-/* $OpenBSD: xheart.c,v 1.25 2012/10/03 11:18:23 miod Exp $ */
+/* $OpenBSD: xheart.c,v 1.26 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2008 Miodrag Vallat.
splx(s);
if (ISSET(ih->ih_flags, IH_ALLOCATED))
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
}
void
-/* $OpenBSD: interrupt.c,v 1.13 2012/09/08 22:01:25 miod Exp $ */
+/* $OpenBSD: interrupt.c,v 1.14 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: interrupt.c,v 1.18 2006/01/25 00:02:57 uwe Exp $ */
/*-
}
mtx_leave(&asi->softintr_lock);
- free(sih, M_DEVBUF);
+ free(sih, M_DEVBUF, 0);
}
/* Schedule a software interrupt. */
-/* $OpenBSD: if_tsec.c,v 1.30 2014/07/08 05:35:18 dlg Exp $ */
+/* $OpenBSD: if_tsec.c,v 1.31 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
}
tsec_dmamem_free(sc, sc->sc_rxring);
- free(sc->sc_rxbuf, M_DEVBUF);
+ free(sc->sc_rxbuf, M_DEVBUF, 0);
}
void
destroy:
bus_dmamap_destroy(sc->sc_dmat, tdm->tdm_map);
tdmfree:
- free(tdm, M_DEVBUF);
+ free(tdm, M_DEVBUF, 0);
return (NULL);
}
bus_dmamem_unmap(sc->sc_dmat, tdm->tdm_kva, tdm->tdm_size);
bus_dmamem_free(sc->sc_dmat, &tdm->tdm_seg, 1);
bus_dmamap_destroy(sc->sc_dmat, tdm->tdm_map);
- free(tdm, M_DEVBUF);
+ free(tdm, M_DEVBUF, 0);
}
struct mbuf *
-/* $OpenBSD: dma.c,v 1.11 2014/07/11 09:36:26 mpi Exp $ */
+/* $OpenBSD: dma.c,v 1.12 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
{
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
-/* $OpenBSD: machdep.c,v 1.38 2014/07/11 22:28:05 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.39 2014/07/12 18:44:42 tedu Exp $ */
/* OpenBSD: machdep.c,v 1.105 2005/04/11 15:13:01 deraadt Exp */
/*
savefpstate(fs);
cpuinfo.fpproc = NULL;
}
- free((void *)fs, M_SUBPROC);
+ free((void *)fs, M_SUBPROC, 0);
p->p_md.md_fpstate = NULL;
}
bzero((caddr_t)tf, sizeof *tf);
-/* $OpenBSD: cs4231.c,v 1.31 2013/05/15 21:19:45 ratchov Exp $ */
+/* $OpenBSD: cs4231.c,v 1.32 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 1999 Jason L. Wright (jason@thought.net)
p->addr_dva = dvma_malloc(size, &p->addr, flags);
if (p->addr_dva == NULL) {
- free(p, pool);
+ free(p, pool, 0);
return (NULL);
}
continue;
dvma_free(p->addr_dva, p->size, &p->addr);
*pp = p->next;
- free(p, pool);
+ free(p, pool, 0);
return;
}
printf("%s: attempt to free rogue pointer\n", sc->sc_dev.dv_xname);
-/* $OpenBSD: fd.c,v 1.89 2013/11/26 15:42:43 martin Exp $ */
+/* $OpenBSD: fd.c,v 1.90 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: fd.c,v 1.51 1997/05/24 20:16:19 pk Exp $ */
/*-
lp = malloc(sizeof(*lp), M_TEMP, M_WAITOK);
fdgetdisklabel(dev, fd, lp, 0);
bcopy(lp, fd->sc_dk.dk_label, sizeof(*lp));
- free(lp, M_TEMP);
+ free(lp, M_TEMP, 0);
return 0;
case DIOCGPDINFO:
/* ...and wait for it to complete */
rv = biowait(bp);
- free(bp, M_TEMP);
+ free(bp, M_TEMP, 0);
return (rv);
}
-/* $OpenBSD: magma.c,v 1.27 2010/07/02 17:27:01 nicm Exp $ */
+/* $OpenBSD: magma.c,v 1.28 2014/07/12 18:44:43 tedu Exp $ */
/*-
* Copyright (c) 1998 Iain Hibbert
uio->uio_resid += (len - cnt);
}
- free(buffer, M_DEVBUF);
+ free(buffer, M_DEVBUF, 0);
return (error);
}
-/* $OpenBSD: autoconf.c,v 1.94 2014/05/09 20:15:06 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.95 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: autoconf.c,v 1.73 1997/07/29 09:41:53 fair Exp $ */
/*
rp->ra_intr[n].int_vec = 0;
};
len *= sizeof(struct rom_intr);
- free(interrupts, M_TEMP);
+ free(interrupts, M_TEMP, 0);
} else
len = 0;
}
-/* $OpenBSD: clock.c,v 1.28 2013/07/05 20:30:56 guenther Exp $ */
+/* $OpenBSD: clock.c,v 1.29 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: clock.c,v 1.52 1997/05/24 20:16:05 pk Exp $ */
/*
out:
if (buf)
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
eeprom_give();
return (error);
#else /* ! SUN4 */
-/* $OpenBSD: intr.c,v 1.38 2012/11/05 13:20:16 miod Exp $ */
+/* $OpenBSD: intr.c,v 1.39 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: intr.c,v 1.20 1997/07/29 09:42:03 fair Exp $ */
/*
struct sintrhand *sih = (struct sintrhand *)arg;
ih_remove(&sintrhand[sih->sih_ipl], &sih->sih_ih);
- free(sih, M_DEVBUF);
+ free(sih, M_DEVBUF, 0);
}
void *
-/* $OpenBSD: machdep.c,v 1.160 2014/07/11 22:28:06 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.161 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */
/*
savefpstate(fs);
cpuinfo.fpproc = NULL;
}
- free((void *)fs, M_SUBPROC);
+ free((void *)fs, M_SUBPROC, 0);
p->p_md.md_fpstate = NULL;
}
bzero((caddr_t)tf, sizeof *tf);
void
_bus_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
{
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
* Return the list of pages back to the VM system.
*/
uvm_pglistfree(segs[0]._ds_mlist);
- free(segs[0]._ds_mlist, M_DEVBUF);
+ free(segs[0]._ds_mlist, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: openprom.c,v 1.5 2003/06/02 23:27:55 millert Exp $ */
+/* $OpenBSD: openprom.c,v 1.6 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: openprom.c,v 1.8 1996/03/31 23:45:34 pk Exp $ */
/*
}
if (name)
- free(name, M_TEMP);
+ free(name, M_TEMP, 0);
if (value)
- free(value, M_TEMP);
+ free(value, M_TEMP, 0);
return (error);
}
-/* $OpenBSD: pmap.c,v 1.164 2014/04/08 13:23:51 mpi Exp $ */
+/* $OpenBSD: pmap.c,v 1.165 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: pmap.c,v 1.118 1998/05/19 19:00:18 thorpej Exp $ */
/*
simple_unlock(&pm->pm_lock);
if (count == 0) {
pmap_release(pm);
- free(pm, M_VMPMAP);
+ free(pm, M_VMPMAP, 0);
}
}
}
#endif
if (pm->pm_regstore)
- free(pm->pm_regstore, M_VMPMAP);
+ free(pm->pm_regstore, M_VMPMAP, 0);
#if defined(SUN4M)
if (CPU_ISSUN4M) {
pm->pm_stats.resident_count--;
}
if ((sp->sg_npte = nleft) == 0) {
- free(pte0, M_VMPMAP);
+ free(pte0, M_VMPMAP, 0);
sp->sg_pte = NULL;
if (--rp->rg_nsegmap == 0) {
- free(rp->rg_segmap, M_VMPMAP);
+ free(rp->rg_segmap, M_VMPMAP, 0);
rp->rg_segmap = NULL;
#if defined(SUN4_MMU3L)
if (HASSUN4_MMU3L && rp->rg_smeg != reginval) {
setregmap(0, rp->rg_smeg);
setsegmap(vs << SGSHIFT, seginval);
}
- free(pte0, M_VMPMAP);
+ free(pte0, M_VMPMAP, 0);
sp->sg_pte = NULL;
me_free(pm, pmeg);
if (--rp->rg_nsegmap == 0) {
- free(rp->rg_segmap, M_VMPMAP);
+ free(rp->rg_segmap, M_VMPMAP, 0);
rp->rg_segmap = NULL;
GAP_WIDEN(pm,vr);
if (pm->pm_ctx)
tlb_flush_context(); /* Paranoia? */
setpgt4m(&pm->pm_reg_ptps[vr], SRMMU_TEINVALID);
- free(rp->rg_segmap, M_VMPMAP);
+ free(rp->rg_segmap, M_VMPMAP, 0);
rp->rg_segmap = NULL;
pool_put(&L23_pool, rp->rg_seg_ptps);
}
if (nleft) {
sp->sg_pte[VA_VPG(va)] = 0;
} else {
- free(sp->sg_pte, M_VMPMAP);
+ free(sp->sg_pte, M_VMPMAP, 0);
sp->sg_pte = NULL;
if (--rp->rg_nsegmap == 0) {
- free(rp->rg_segmap, M_VMPMAP);
+ free(rp->rg_segmap, M_VMPMAP, 0);
rp->rg_segmap = NULL;
GAP_WIDEN(pm,vr);
#if defined(SUN4_MMU3L)
setsegmap(vs << SGSHIFT, seginval);
}
#endif
- free(sp->sg_pte, M_VMPMAP);
+ free(sp->sg_pte, M_VMPMAP, 0);
sp->sg_pte = NULL;
me_free(pm, sp->sg_pmeg);
region_free(pm, rp->rg_smeg);
}
#endif
- free(rp->rg_segmap, M_VMPMAP);
+ free(rp->rg_segmap, M_VMPMAP, 0);
rp->rg_segmap = NULL;
GAP_WIDEN(pm,vr);
}
if (pm->pm_ctx)
tlb_flush_context();
setpgt4m(&pm->pm_reg_ptps[vr], SRMMU_TEINVALID);
- free(rp->rg_segmap, M_VMPMAP);
+ free(rp->rg_segmap, M_VMPMAP, 0);
rp->rg_segmap = NULL;
pool_put(&L23_pool, rp->rg_seg_ptps);
}
-/* $OpenBSD: vm_machdep.c,v 1.56 2013/01/16 19:04:43 miod Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.57 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: vm_machdep.c,v 1.30 1997/03/10 23:55:40 pk Exp $ */
/*
*(vaddr_t *)kaddr = kva;
dva = dvma_mapin_space(kernel_map, kva, len, (flags & M_NOWAIT) ? 0 : 1, space);
if (dva == 0) {
- free((void *)kva, M_DEVBUF);
+ free((void *)kva, M_DEVBUF, 0);
return (NULL);
}
return (caddr_t)dva;
if (!has_iocache)
#endif
kvm_recache(kaddr, atop(len));
- free((void *)kva, M_DEVBUF);
+ free((void *)kva, M_DEVBUF, 0);
}
u_long dvma_cachealign = 0;
savefpstate(fs);
cpuinfo.fpproc = NULL;
}
- free((void *)fs, M_SUBPROC);
+ free((void *)fs, M_SUBPROC, 0);
}
pmap_deactivate(p);
-/* $OpenBSD: dvma.c,v 1.5 2011/04/14 18:27:49 miod Exp $ */
+/* $OpenBSD: dvma.c,v 1.6 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: dvma.c,v 1.2 1995/09/17 00:50:56 pk Exp $ */
/*
* Copyright (c) 1995 Gordon W. Ross
return (dvma_mapin(mem, len));
}
-extern void free(void *ptr, int len);
+extern void free(void *ptr, int len, 0);
void
dvma_free(char *dvma, int len)
{
mem = dvma_mapout(dvma, len);
if (mem)
- free(mem, len);
+ free(mem, len, 0);
}
-/* $OpenBSD: installboot.c,v 1.8 2013/09/29 21:30:50 jmc Exp $ */
+/* $OpenBSD: installboot.c,v 1.9 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: installboot.c,v 1.1 1997/06/01 03:39:45 mrg Exp $ */
/*
}
if (read(fd, bp, statbuf.st_size) != statbuf.st_size) {
warn("read: %s", fname);
- free(bp);
+ free(bp, 0);
close(fd);
return NULL;
}
if ((int)block_table & 3) {
warn("%s: invalid address: block_table = %x",
fname, block_table);
- free(bp);
+ free(bp, 0);
close(fd);
return NULL;
}
if ((int)block_count_p & 3) {
warn("%s: invalid address: block_count_p = %x",
fname, block_count_p);
- free(bp);
+ free(bp, 0);
close(fd);
return NULL;
}
if ((int)block_size_p & 3) {
warn("%s: invalid address: block_size_p = %x",
fname, block_size_p);
- free(bp);
+ free(bp, 0);
close(fd);
return NULL;
}
-/* $OpenBSD: nlist.c,v 1.1 2013/10/30 18:04:47 deraadt Exp $ */
+/* $OpenBSD: nlist.c,v 1.2 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
}
aout_done:
if (usemalloc)
- free(strtab);
+ free(strtab, 0);
else
munmap(strtab, strsize);
return (nent);
-/* $OpenBSD: ce4231.c,v 1.30 2013/05/16 06:31:50 kettenis Exp $ */
+/* $OpenBSD: ce4231.c,v 1.31 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 1999 Jason L. Wright (jason@thought.net)
fail1:
bus_dmamap_destroy(dmat, p->dmamap);
fail:
- free(p, pool);
+ free(p, pool, 0);
return (NULL);
}
bus_dmamem_free(dmat, p->segs, p->nsegs);
bus_dmamap_destroy(dmat, p->dmamap);
*pp = p->next;
- free(p, pool);
+ free(p, pool, 0);
return;
}
printf("%s: attempt to free rogue pointer\n", sc->sc_dev.dv_xname);
-/* $OpenBSD: central.c,v 1.7 2010/11/11 17:58:23 miod Exp $ */
+/* $OpenBSD: central.c,v 1.8 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2004 Jason L. Wright (jason@thought.net)
(void)config_found(&sc->sc_dv, (void *)&ca, central_print);
if (ca.ca_name != NULL)
- free(ca.ca_name, M_DEVBUF);
+ free(ca.ca_name, M_DEVBUF, 0);
}
}
-/* $OpenBSD: creator.c,v 1.47 2014/03/29 18:09:30 guenther Exp $ */
+/* $OpenBSD: creator.c,v 1.48 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
if (sizeof(*fw) > buflen ||
fw->fw_size * sizeof(u_int32_t) > (buflen - sizeof(*fw))) {
printf("%s: corrupt firmware\n", sc->sc_sunfb.sf_dev.dv_xname);
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
return;
}
creator_ras_wait(sc);
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
}
#endif /* SMALL_KERNEL */
-/* $OpenBSD: ebus.c,v 1.22 2008/06/11 05:15:43 kettenis Exp $ */
+/* $OpenBSD: ebus.c,v 1.23 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: ebus.c,v 1.24 2001/07/25 03:49:54 eeh Exp $ */
/*
ebus_destroy_attach_args(struct ebus_attach_args *ea)
{
if (ea->ea_name)
- free((void *)ea->ea_name, M_DEVBUF);
+ free((void *)ea->ea_name, M_DEVBUF, 0);
if (ea->ea_regs)
- free((void *)ea->ea_regs, M_DEVBUF);
+ free((void *)ea->ea_regs, M_DEVBUF, 0);
if (ea->ea_intrs)
- free((void *)ea->ea_intrs, M_DEVBUF);
+ free((void *)ea->ea_intrs, M_DEVBUF, 0);
if (ea->ea_vaddrs)
- free((void *)ea->ea_vaddrs, M_DEVBUF);
+ free((void *)ea->ea_vaddrs, M_DEVBUF, 0);
}
int
-/* $OpenBSD: fd.c,v 1.44 2014/04/28 21:01:51 brad Exp $ */
+/* $OpenBSD: fd.c,v 1.45 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: fd.c,v 1.112 2003/08/07 16:29:35 agc Exp $ */
/*-
lp = malloc(sizeof(*lp), M_TEMP, M_WAITOK);
fdgetdisklabel(dev, fd, lp, 0);
bcopy(lp, fd->sc_dk.dk_label, sizeof(*lp));
- free(lp, M_TEMP);
+ free(lp, M_TEMP, 0);
return 0;
case DIOCGPDINFO:
/* ...and wait for it to complete */
rv = biowait(bp);
- free(bp, M_TEMP);
+ free(bp, M_TEMP, 0);
return (rv);
}
-/* $OpenBSD: fhc.c,v 1.18 2011/04/07 15:30:16 miod Exp $ */
+/* $OpenBSD: fhc.c,v 1.19 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2004 Jason L. Wright (jason@thought.net)
(void)config_found(&sc->sc_dv, (void *)&fa, fhc_print);
if (fa.fa_name != NULL)
- free(fa.fa_name, M_DEVBUF);
+ free(fa.fa_name, M_DEVBUF, 0);
if (fa.fa_reg != NULL)
- free(fa.fa_reg, M_DEVBUF);
+ free(fa.fa_reg, M_DEVBUF, 0);
if (fa.fa_intr != NULL)
- free(fa.fa_intr, M_DEVBUF);
+ free(fa.fa_intr, M_DEVBUF, 0);
if (fa.fa_promvaddrs != NULL)
- free(fa.fa_promvaddrs, M_DEVBUF);
+ free(fa.fa_promvaddrs, M_DEVBUF, 0);
}
sc->sc_blink.bl_func = fhc_led_blink;
-/* $OpenBSD: iommu.c,v 1.68 2014/05/10 12:20:38 kettenis Exp $ */
+/* $OpenBSD: iommu.c,v 1.69 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: iommu.c,v 1.47 2002/02/08 20:03:45 eeh Exp $ */
/*
ims->ims_map.ipm_pagecnt);
#endif
- free(ims, M_DEVBUF);
+ free(ims, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: ldc.c,v 1.9 2012/10/21 18:56:00 kettenis Exp $ */
+/* $OpenBSD: ldc.c,v 1.10 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2009 Mark Kettenis
*
bus_dmamem_unmap(t, lq->lq_va, size);
bus_dmamem_free(t, &lq->lq_seg, 1);
bus_dmamap_destroy(t, lq->lq_map);
- free(lq, M_DEVBUF);
+ free(lq, M_DEVBUF, 0);
}
struct ldc_map *
bus_dmamem_unmap(t, (caddr_t)lm->lm_slot, size);
bus_dmamem_free(t, &lm->lm_seg, 1);
bus_dmamap_destroy(t, lm->lm_map);
- free(lm, M_DEVBUF);
+ free(lm, M_DEVBUF, 0);
}
-/* $OpenBSD: msi.c,v 1.1 2011/07/06 05:35:53 kettenis Exp $ */
+/* $OpenBSD: msi.c,v 1.2 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2011 Mark Kettenis <kettenis@openbsd.org>
*
bus_dmamem_unmap(t, meq->meq_va, size);
bus_dmamem_free(t, &meq->meq_seg, 1);
bus_dmamap_destroy(t, meq->meq_map);
- free(meq, M_DEVBUF);
+ free(meq, M_DEVBUF, 0);
}
-/* $OpenBSD: psycho.c,v 1.71 2014/07/12 14:12:44 uebayasi Exp $ */
+/* $OpenBSD: psycho.c,v 1.72 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: psycho.c,v 1.39 2001/10/07 20:30:41 eeh Exp $ */
/*
}
#undef TSBCASE
DPRINTF(PDB_CONF, ("psycho_iommu_init: iobase=0x%x\n", iobase));
- free(vdma, M_DEVBUF);
+ free(vdma, M_DEVBUF, 0);
} else {
DPRINTF(PDB_CONF, ("psycho_iommu_init: getprop failed, "
"iobase=0x%x, tsbsize=%d\n", iobase, tsbsize));
-/* $OpenBSD: pyro.c,v 1.26 2014/01/21 10:59:30 dlg Exp $ */
+/* $OpenBSD: pyro.c,v 1.27 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
pba.pba_pc->conf_write = pyro_conf_write;
pba.pba_pc->intr_map = pyro_intr_map;
- free(busranges, M_DEVBUF);
+ free(busranges, M_DEVBUF, 0);
#ifdef DDB
db_register_xir(pyro_xir, sc);
return;
free_table:
- free(pbm->pp_msi, M_DEVBUF);
+ free(pbm->pp_msi, M_DEVBUF, 0);
}
int
-/* $OpenBSD: sbus.c,v 1.40 2014/07/12 14:12:44 uebayasi Exp $ */
+/* $OpenBSD: sbus.c,v 1.41 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: sbus.c,v 1.46 2001/10/07 20:30:41 eeh Exp $ */
/*-
sbus_destroy_attach_args(struct sbus_attach_args *sa)
{
if (sa->sa_name != NULL)
- free(sa->sa_name, M_DEVBUF);
+ free(sa->sa_name, M_DEVBUF, 0);
if (sa->sa_nreg != 0)
- free(sa->sa_reg, M_DEVBUF);
+ free(sa->sa_reg, M_DEVBUF, 0);
if (sa->sa_intr)
- free(sa->sa_intr, M_DEVBUF);
+ free(sa->sa_intr, M_DEVBUF, 0);
if (sa->sa_promvaddrs)
- free((void *)sa->sa_promvaddrs, M_DEVBUF);
+ free((void *)sa->sa_promvaddrs, M_DEVBUF, 0);
bzero(sa, sizeof(struct sbus_attach_args)); /*DEBUG*/
}
ip[n].sbi_pri = pri | ipl[n];
ip[n].sbi_vec = ipl[n];
}
- free(ipl, M_DEVBUF);
+ free(ipl, M_DEVBUF, 0);
*ipp = ip;
}
-/* $OpenBSD: schizo.c,v 1.65 2014/05/10 12:18:38 kettenis Exp $ */
+/* $OpenBSD: schizo.c,v 1.66 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
pba.pba_pc->conf_write = schizo_conf_write;
pba.pba_pc->intr_map = schizo_intr_map;
- free(busranges, M_DEVBUF);
+ free(busranges, M_DEVBUF, 0);
schizo_pbm_write(pbm, SCZ_PCI_INTR_RETRY, 5);
}
#undef TSBCASE
DPRINTF(SDB_BUSMAP, ("schizo_iommu_init: iobase=0x%x\n", iobase));
- free(vdma, M_DEVBUF);
+ free(vdma, M_DEVBUF, 0);
} else {
DPRINTF(SDB_BUSMAP, ("schizo_iommu_init: getprop failed, "
"using iobase=0x%x, tsbsize=%d\n", iobase, tsbsize));
map, clr, name);
if (ih == NULL) {
printf("set_intr failed...\n");
- free(name, M_DEVBUF);
+ free(name, M_DEVBUF, 0);
return;
}
-/* $OpenBSD: ssm.c,v 1.1 2008/07/06 08:51:44 kettenis Exp $ */
+/* $OpenBSD: ssm.c,v 1.2 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
*
getprop(node, "reg", sizeof(*nma.ma_reg),
&nma.ma_nreg, (void **)&nma.ma_reg);
config_found(self, &nma, ssm_print);
- free(nma.ma_reg, M_DEVBUF);
+ free(nma.ma_reg, M_DEVBUF, 0);
}
}
-/* $OpenBSD: vbus.c,v 1.6 2013/07/16 21:08:06 kettenis Exp $ */
+/* $OpenBSD: vbus.c,v 1.7 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
*
node = imap[address_cells + interrupt_cells];
devino = imap[address_cells + interrupt_cells + 1];
- free(reg, M_DEVBUF);
+ free(reg, M_DEVBUF, 0);
reg = NULL;
getprop(node, "reg", sizeof(*reg), &nreg, (void **)®);
-/* $OpenBSD: vdsk.c,v 1.38 2014/05/10 11:49:31 kettenis Exp $ */
+/* $OpenBSD: vdsk.c,v 1.39 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2009, 2011 Mark Kettenis
*
bus_dmamem_unmap(t, (caddr_t)vd->vd_desc, size);
bus_dmamem_free(t, &vd->vd_seg, 1);
bus_dmamap_destroy(t, vd->vd_map);
- free(vd, M_DEVBUF);
+ free(vd, M_DEVBUF, 0);
}
void *
-/* $OpenBSD: vdsp.c,v 1.26 2014/05/10 11:49:31 kettenis Exp $ */
+/* $OpenBSD: vdsp.c,v 1.27 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2009, 2011, 2014 Mark Kettenis
*
sc->sc_vio_state = 0;
sc->sc_seq_no = 0;
if (sc->sc_vd) {
- free(sc->sc_vd, M_DEVBUF);
+ free(sc->sc_vd, M_DEVBUF, 0);
sc->sc_vd = NULL;
}
if (sc->sc_vd_task) {
- free(sc->sc_vd_task, M_DEVBUF);
+ free(sc->sc_vd_task, M_DEVBUF, 0);
sc->sc_vd_task = NULL;
}
if (sc->sc_label) {
- free(sc->sc_label, M_DEVBUF);
+ free(sc->sc_label, M_DEVBUF, 0);
sc->sc_label = NULL;
}
err = VOP_READ(sc->sc_vp, &uio, 0, p->p_ucred);
VOP_UNLOCK(sc->sc_vp, 0, p);
if (err) {
- free(sc->sc_label, M_DEVBUF);
+ free(sc->sc_label, M_DEVBUF, 0);
sc->sc_label = NULL;
}
}
if (err == 0 && memcmp(vdp->id, ISO_STANDARD_ID, sizeof(vdp->id)))
err = ENOENT;
- free(vdp, M_DEVBUF);
+ free(vdp, M_DEVBUF, 0);
return (err == 0);
}
}
fail:
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
/* ACK the descriptor. */
dm->tag.stype = VIO_SUBTYPE_ACK;
}
fail:
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
/* ACK the descriptor. */
vd->hdr.dstate = VIO_DESC_DONE;
VOP_UNLOCK(sc->sc_vp, 0, p);
fail:
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
/* ACK the descriptor. */
vd->hdr.dstate = VIO_DESC_DONE;
vd->status = 0;
fail:
- free(vt, M_DEVBUF);
+ free(vt, M_DEVBUF, 0);
/* ACK the descriptor. */
vd->hdr.dstate = VIO_DESC_DONE;
vd->status = vdsp_writelabel(sc);
fail:
- free(vt, M_DEVBUF);
+ free(vt, M_DEVBUF, 0);
/* ACK the descriptor. */
vd->hdr.dstate = VIO_DESC_DONE;
vd->status = 0;
fail:
- free(vg, M_DEVBUF);
+ free(vg, M_DEVBUF, 0);
/* ACK the descriptor. */
vd->hdr.dstate = VIO_DESC_DONE;
-/* $OpenBSD: vldcp.c,v 1.8 2014/05/10 11:49:31 kettenis Exp $ */
+/* $OpenBSD: vldcp.c,v 1.9 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2009, 2012 Mark Kettenis
*
hi->hi_cookie + offset, pa, nbytes, &nbytes);
if (err != H_EOK) {
printf("hv_ldc_copy %d\n", err);
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
device_unref(&sc->sc_dv);
return (EINVAL);
}
err = copyout(buf, (caddr_t)hi->hi_addr + offset, nbytes);
if (err) {
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
device_unref(&sc->sc_dv);
return (err);
}
nbytes = min(PAGE_SIZE, size);
err = copyin((caddr_t)hi->hi_addr + offset, buf, nbytes);
if (err) {
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
device_unref(&sc->sc_dv);
return (err);
}
hi->hi_cookie + offset, pa, nbytes, &nbytes);
if (err != H_EOK) {
printf("hv_ldc_copy %d\n", err);
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
device_unref(&sc->sc_dv);
return (EINVAL);
}
}
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
device_unref(&sc->sc_dv);
return (0);
-/* $OpenBSD: vnet.c,v 1.32 2014/07/08 02:59:51 dlg Exp $ */
+/* $OpenBSD: vnet.c,v 1.33 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2009 Mark Kettenis
*
bus_dmamem_unmap(t, (caddr_t)vd->vd_desc, size);
bus_dmamem_free(t, &vd->vd_seg, 1);
bus_dmamap_destroy(t, vd->vd_map);
- free(vd, M_DEVBUF);
+ free(vd, M_DEVBUF, 0);
}
-/* $OpenBSD: vpci.c,v 1.14 2014/05/10 11:49:31 kettenis Exp $ */
+/* $OpenBSD: vpci.c,v 1.15 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis <kettenis@openbsd.org>
*
pba.pba_pc->conf_write = vpci_conf_write;
pba.pba_pc->intr_map = vpci_intr_map;
- free(busranges, M_DEVBUF);
+ free(busranges, M_DEVBUF, 0);
config_found(&sc->sc_dv, &pba, vpci_print);
}
free_queue:
msi_eq_free(sc->sc_dmat, pbm->vp_meq);
free_table:
- free(pbm->vp_msi, M_DEVBUF);
+ free(pbm->vp_msi, M_DEVBUF, 0);
}
int
-/* $OpenBSD: autoconf.c,v 1.119 2014/05/10 12:29:58 kettenis Exp $ */
+/* $OpenBSD: autoconf.c,v 1.120 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: autoconf.c,v 1.51 2001/07/24 19:32:11 eeh Exp $ */
/*
rv = getprop(node, "interrupts", sizeof(*ma.ma_interrupts),
&ma.ma_ninterrupts, (void **)&ma.ma_interrupts);
if (rv != 0 && rv != ENOENT) {
- free(ma.ma_reg, M_DEVBUF);
+ free(ma.ma_reg, M_DEVBUF, 0);
continue;
}
#ifdef DEBUG
rv = getprop(node, "address", sizeof(*ma.ma_address),
&ma.ma_naddress, (void **)&ma.ma_address);
if (rv != 0 && rv != ENOENT) {
- free(ma.ma_reg, M_DEVBUF);
+ free(ma.ma_reg, M_DEVBUF, 0);
if (ma.ma_ninterrupts)
- free(ma.ma_interrupts, M_DEVBUF);
+ free(ma.ma_interrupts, M_DEVBUF, 0);
continue;
}
#ifdef DEBUG
}
#endif
config_found(dev, &ma, mbprint);
- free(ma.ma_reg, M_DEVBUF);
+ free(ma.ma_reg, M_DEVBUF, 0);
if (ma.ma_ninterrupts)
- free(ma.ma_interrupts, M_DEVBUF);
+ free(ma.ma_interrupts, M_DEVBUF, 0);
if (ma.ma_naddress)
- free(ma.ma_address, M_DEVBUF);
+ free(ma.ma_address, M_DEVBUF, 0);
}
extern int prom_cngetc(dev_t);
-/* $OpenBSD: clock.c,v 1.53 2014/05/10 12:15:19 kettenis Exp $ */
+/* $OpenBSD: clock.c,v 1.54 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: clock.c,v 1.41 2001/07/24 19:29:25 eeh Exp $ */
/*
if (getprop(node, "idprom", sizeof(*idp), &n, (void **)&idp) != 0)
return (NULL);
if (n != 1) {
- free(idp, M_DEVBUF);
+ free(idp, M_DEVBUF, 0);
return (NULL);
}
return (idp);
cp[4] = idp->id_ether[4];
cp[5] = idp->id_ether[5];
if (idprom == NULL)
- free(idp, M_DEVBUF);
+ free(idp, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: intr.c,v 1.48 2014/05/10 12:29:58 kettenis Exp $ */
+/* $OpenBSD: intr.c,v 1.49 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: intr.c,v 1.39 2001/07/19 23:38:11 eeh Exp $ */
/*
softintr_disestablish(cookie)
void *cookie;
{
- free(cookie, M_DEVBUF);
+ free(cookie, M_DEVBUF, 0);
}
void
-/* $OpenBSD: machdep.c,v 1.163 2014/07/11 22:28:06 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.164 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */
/*-
* to save it. In any case, get rid of our FPU state.
*/
fpusave_proc(p, 0);
- free(p->p_md.md_fpstate, M_SUBPROC);
+ free(p->p_md.md_fpstate, M_SUBPROC, 0);
p->p_md.md_fpstate = NULL;
}
bzero((caddr_t)tf, sizeof *tf);
if (map->dm_nsegs)
bus_dmamap_unload(t0, map);
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
* Return the list of pages back to the VM system.
*/
uvm_pglistfree(segs[0]._ds_mlist);
- free(segs[0]._ds_mlist, M_DEVBUF);
+ free(segs[0]._ds_mlist, M_DEVBUF, 0);
}
/*
void
bus_intr_free(void *arg)
{
- free(arg, M_DEVBUF);
+ free(arg, M_DEVBUF, 0);
}
void *
-/* $OpenBSD: openprom.c,v 1.17 2011/06/17 07:06:46 mk Exp $ */
+/* $OpenBSD: openprom.c,v 1.18 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: openprom.c,v 1.4 2002/01/10 06:21:53 briggs Exp $ */
/*
}
if (name)
- free(name, M_TEMP);
+ free(name, M_TEMP, 0);
if (value)
- free(value, M_TEMP);
+ free(value, M_TEMP, 0);
return (error);
}
-/* $OpenBSD: vm_machdep.c,v 1.29 2013/01/16 19:04:43 miod Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.30 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: vm_machdep.c,v 1.38 2001/06/30 00:02:20 eeh Exp $ */
/*
{
if (p->p_md.md_fpstate != NULL) {
fpusave_proc(p, 0);
- free(p->p_md.md_fpstate, M_SUBPROC);
+ free(p->p_md.md_fpstate, M_SUBPROC, 0);
}
pmap_deactivate(p);
-/* $OpenBSD: elf64_exec.c,v 1.4 2013/12/28 21:00:21 kettenis Exp $ */
+/* $OpenBSD: elf64_exec.c,v 1.5 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: elfXX_exec.c,v 1.2 2001/08/15 20:08:15 eeh Exp $ */
/*
elf->e_phnum = 0;
bcopy(elf, addr, sizeof(Elf_Ehdr));
bcopy(shp, addr + sizeof(Elf_Ehdr), elf->e_shnum * sizeof(Elf_Shdr));
- free(shp, elf->e_shnum * sizeof(Elf_Shdr));
+ free(shp, elf->e_shnum * sizeof(Elf_Shdr), 0);
*ssymp = addr;
/*
-/* $OpenBSD: if_qe.c,v 1.26 2013/11/27 08:56:31 mpi Exp $ */
+/* $OpenBSD: if_qe.c,v 1.27 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: if_qe.c,v 1.51 2002/06/08 12:28:37 ragge Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
* All done with the bus resources.
*/
ubfree((void *)parent, &ui);
- free(ring, M_TEMP);
+ free(ring, M_TEMP, 0);
return 1;
}
-/* $OpenBSD: if_uba.c,v 1.11 2003/11/10 21:05:04 miod Exp $ */
+/* $OpenBSD: if_uba.c,v 1.12 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: if_uba.c,v 1.15 1999/01/01 21:43:18 ragge Exp $ */
/*
ubarelse(ifu->iff_softc, &ifw[nw].ifw_info);
while (--nr >= 0)
ubarelse(ifu->iff_softc, &ifr[nr].ifrw_info);
- free(cp, M_DEVBUF);
+ free(cp, M_DEVBUF, 0);
ifr[0].ifrw_addr = 0;
return (0);
}
-/* $OpenBSD: legss.c,v 1.6 2013/10/21 10:36:20 miod Exp $ */
+/* $OpenBSD: legss.c,v 1.7 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2008 Miodrag Vallat.
vax_unmap_physmem(scr->ss_vram,
(LEGSS_VISHEIGHT * LEGSS_WIDTH * 32 / NBBY) / VAX_NBPG);
bad1:
- free(scr, M_DEVBUF);
+ free(scr, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: mscp.c,v 1.11 2012/12/05 23:20:15 deraadt Exp $ */
+/* $OpenBSD: mscp.c,v 1.12 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: mscp.c,v 1.16 2001/11/13 07:38:28 lukem Exp $ */
/*
panic("mscp_dorsp");
if (mi->mi_driveno) {
bcopy(mi->mi_dp, tmp, mi->mi_driveno);
- free(mi->mi_dp, mi->mi_driveno);
+ free(mi->mi_dp, mi->mi_driveno, 0);
}
mi->mi_driveno = tmpno;
mi->mi_dp = tmp;
-/* $OpenBSD: uda.c,v 1.9 2011/07/06 18:32:59 miod Exp $ */
+/* $OpenBSD: uda.c,v 1.10 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: uda.c,v 1.36 2000/06/04 06:17:05 matt Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
return 0;
mscp_dgo(sc->sc_softc, mxi);
sc->sc_inq--;
- free(uu, M_DEVBUF);
+ free(uu, M_DEVBUF, 0);
return 1;
}
-/* $OpenBSD: bus_dma.c,v 1.28 2014/07/11 09:36:26 mpi Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.29 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: bus_dma.c,v 1.5 1999/11/13 00:32:20 thorpej Exp $ */
/*-
if (map->dm_nsegs > 0)
printf("bus_dmamap_destroy() called for map with valid mappings\n");
#endif /* DIAGNOSTIC */
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: softintr.c,v 1.3 2014/07/08 17:19:25 deraadt Exp $ */
+/* $OpenBSD: softintr.c,v 1.4 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: softintr.c,v 1.2 2003/07/15 00:24:39 lukem Exp $ */
/*
}
mtx_leave(&siq->siq_mtx);
- free(sih, M_DEVBUF);
+ free(sih, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: gpx.c,v 1.23 2013/10/21 10:36:20 miod Exp $ */
+/* $OpenBSD: gpx.c,v 1.24 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2006 Miodrag Vallat.
*
bad2:
vax_unmap_physmem((vaddr_t)scr->ss_adder, 1);
bad1:
- free(scr, M_DEVBUF);
+ free(scr, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: lcg.c,v 1.21 2013/10/21 10:36:21 miod Exp $ */
+/* $OpenBSD: lcg.c,v 1.22 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2006 Miodrag Vallat.
*
fail2:
vax_unmap_physmem((vaddr_t)ss->ss_addr, ss->ss_fbsize / VAX_NBPG);
fail1:
- free(ss, M_DEVBUF);
+ free(ss, M_DEVBUF, 0);
}
/*
-/* $OpenBSD: lcspx.c,v 1.19 2013/10/21 10:36:21 miod Exp $ */
+/* $OpenBSD: lcspx.c,v 1.20 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2006 Miodrag Vallat.
*
vax_unmap_physmem((vaddr_t)ss->ss_ramdac[i], 1);
vax_unmap_physmem(ss->ss_reg, LCSPX_REG_SIZE / VAX_NBPG);
fail1:
- free(ss, M_DEVBUF);
+ free(ss, M_DEVBUF, 0);
}
static __inline__ void
-/* $OpenBSD: smg.c,v 1.26 2013/10/21 10:36:21 miod Exp $ */
+/* $OpenBSD: smg.c,v 1.27 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: smg.c,v 1.21 2000/03/23 06:46:44 thorpej Exp $ */
/*
* Copyright (c) 2006, Miodrag Vallat
(caddr_t)vax_map_physmem(SMADDR, SMSIZE / VAX_NBPG);
if (scr->ss_addr == NULL) {
printf(": can not map frame buffer\n");
- free(scr, M_DEVBUF);
+ free(scr, M_DEVBUF, 0);
return;
}
printf(": can not map cursor chip\n");
vax_unmap_physmem((vaddr_t)scr->ss_addr,
SMSIZE / VAX_NBPG);
- free(scr, M_DEVBUF);
+ free(scr, M_DEVBUF, 0);
return;
}
vax_unmap_physmem((vaddr_t)scr->ss_cursor, 1);
vax_unmap_physmem((vaddr_t)scr->ss_addr,
SMSIZE / VAX_NBPG);
- free(scr, M_DEVBUF);
+ free(scr, M_DEVBUF, 0);
return;
}
}
-/* $OpenBSD: zaurus_flash.c,v 1.12 2014/05/08 21:17:01 miod Exp $ */
+/* $OpenBSD: zaurus_flash.c,v 1.13 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2005 Uwe Stuehler <uwe@openbsd.org>
}
bp->b_resid = bp->b_bcount - sc->sc_flash.sc_flashdev->pagesize;
- free(oob, M_DEVBUF);
- free(buf, M_DEVBUF);
+ free(oob, M_DEVBUF, 0);
+ free(buf, M_DEVBUF, 0);
return;
bad:
bp->b_flags |= B_ERROR;
if (oob != NULL)
- free(oob, M_DEVBUF);
+ free(oob, M_DEVBUF, 0);
if (buf != NULL)
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
}
int
phyuse = (u_int16_t *)malloc(sp->sp_pblks * sizeof(u_int16_t),
M_DEVBUF, M_NOWAIT);
if (phyuse == NULL) {
- free(sp, M_DEVBUF);
+ free(sp, M_DEVBUF, 0);
return ENOMEM;
}
sp->sp_phyuse = phyuse;
logmap = (u_int *)malloc(sp->sp_lblks * sizeof(u_int),
M_DEVBUF, M_NOWAIT);
if (logmap == NULL) {
- free(phyuse, M_DEVBUF);
- free(sp, M_DEVBUF);
+ free(phyuse, M_DEVBUF, 0);
+ free(sp, M_DEVBUF, 0);
return ENOMEM;
}
sp->sp_logmap = logmap;
return;
sp = sc->sc_safe[part];
- free(sp->sp_phyuse, M_DEVBUF);
- free(sp->sp_logmap, M_DEVBUF);
- free(sp, M_DEVBUF);
+ free(sp->sp_phyuse, M_DEVBUF, 0);
+ free(sp->sp_logmap, M_DEVBUF, 0);
+ free(sp, M_DEVBUF, 0);
sc->sc_safe[part] = NULL;
}
-/* $OpenBSD: diskprobe.c,v 1.3 2006/10/13 00:00:55 krw Exp $ */
+/* $OpenBSD: diskprobe.c,v 1.4 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
bzero(dip, sizeof(*dip));
if (bios_getdiskinfo(order[i], &dip->bios_info) != NULL) {
- free(dip, 0);
+ free(dip, 0, 0);
continue;
}