diff --git a/sys/uvm/uvm_amap.c b/sys/uvm/uvm_amap.c index 0f8bcd1e9a65..fc48f8fefa6d 100644 --- a/sys/uvm/uvm_amap.c +++ b/sys/uvm/uvm_amap.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_amap.c,v 1.10 1998/06/20 13:16:29 mrg Exp $ */ +/* $NetBSD: uvm_amap.c,v 1.11 1998/08/09 22:36:37 perry Exp $ */ /* * XXXCDC: "ROUGH DRAFT" QUALITY UVM PRE-RELEASE FILE! @@ -202,7 +202,7 @@ amap_alloc(sz, padsz, waitf) amap = amap_alloc1(slots, padslots, waitf); if (amap) - bzero(amap->am_anon, (slots + padslots) * sizeof(struct vm_anon *)); + memset(amap->am_anon, 0, (slots + padslots) * sizeof(struct vm_anon *)); UVMHIST_LOG(maphist,"<- done, amap = 0x%x, sz=%d", amap, sz, 0, 0); return(amap); @@ -364,27 +364,27 @@ amap_extend(entry, addsize) /* do am_slots */ oldsl = amap->am_slots; - bcopy(oldsl, newsl, sizeof(int) * amap->am_nused); + memcpy(newsl, oldsl, sizeof(int) * amap->am_nused); amap->am_slots = newsl; /* do am_anon */ oldover = amap->am_anon; - bcopy(oldover, newover, sizeof(struct vm_anon *) * amap->am_nslot); - bzero(newover + amap->am_nslot, sizeof(struct vm_anon *) * slotadded); + memcpy(newover, oldover, sizeof(struct vm_anon *) * amap->am_nslot); + memset(newover + amap->am_nslot, 0, sizeof(struct vm_anon *) * slotadded); amap->am_anon = newover; /* do am_bckptr */ oldbck = amap->am_bckptr; - bcopy(oldbck, newbck, sizeof(int) * amap->am_nslot); - bzero(newbck + amap->am_nslot, sizeof(int) * slotadded); /* XXX: needed? */ + memcpy(newbck, oldbck, sizeof(int) * amap->am_nslot); + memset(newbck + amap->am_nslot, 0, sizeof(int) * slotadded); /* XXX: needed? */ amap->am_bckptr = newbck; #ifdef VM_AMAP_PPREF /* do ppref */ oldppref = amap->am_ppref; if (newppref) { - bcopy(oldppref, newppref, sizeof(int) * amap->am_nslot); - bzero(newppref + amap->am_nslot, sizeof(int) * slotadded); + memcpy(newppref, oldppref, sizeof(int) * amap->am_nslot); + memset(newppref + amap->am_nslot, 0, sizeof(int) * slotadded); amap->am_ppref = newppref; if ((slotoff + slotmapped) < amap->am_nslot) amap_pp_adjref(amap, slotoff + slotmapped, @@ -875,7 +875,7 @@ amap_pp_establish(amap) /* * init ppref */ - bzero(amap->am_ppref, sizeof(int) * amap->am_maxslot); + memset(amap->am_ppref, 0, sizeof(int) * amap->am_maxslot); pp_setreflen(amap->am_ppref, 0, amap->am_ref, amap->am_nslot); return; } @@ -1041,7 +1041,7 @@ uvm_anon_init() panic("uvm_anon_init"); } - bzero(anon, sizeof(*anon) * nanon); + memset(anon, 0, sizeof(*anon) * nanon); uvm.afree = NULL; uvmexp.nanon = uvmexp.nfreeanon = nanon; for (lcv = 0 ; lcv < nanon ; lcv++) { @@ -1066,7 +1066,7 @@ uvm_anon_add(pages) M_WAITOK); simple_lock(&uvm.afreelock); - bzero(anon, sizeof(*anon) * pages); + memset(anon, 0, sizeof(*anon) * pages); uvmexp.nanon += pages; uvmexp.nfreeanon += pages; for (lcv = 0; lcv < pages; lcv++) { diff --git a/sys/uvm/uvm_amap_i.h b/sys/uvm/uvm_amap_i.h index f449edacd405..7e93ba3e4f1c 100644 --- a/sys/uvm/uvm_amap_i.h +++ b/sys/uvm/uvm_amap_i.h @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_amap_i.h,v 1.6 1998/02/10 14:12:05 mrg Exp $ */ +/* $NetBSD: uvm_amap_i.h,v 1.7 1998/08/09 22:36:37 perry Exp $ */ /* * XXXCDC: "ROUGH DRAFT" QUALITY UVM PRE-RELEASE FILE! @@ -103,7 +103,7 @@ amap_lookups(aref, offset, anons, npages) if ((slot + (npages - 1)) >= amap->am_nslot) panic("amap_lookups: offset out of range"); - bcopy(&amap->am_anon[slot], anons, npages * sizeof(struct vm_anon *)); + memcpy(anons, &amap->am_anon[slot], npages * sizeof(struct vm_anon *)); UVMHIST_LOG(maphist, "<- done", 0, 0, 0, 0); return; diff --git a/sys/uvm/uvm_aobj.c b/sys/uvm/uvm_aobj.c index 31a70dc754c3..9c052515fad4 100644 --- a/sys/uvm/uvm_aobj.c +++ b/sys/uvm/uvm_aobj.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_aobj.c,v 1.8 1998/03/01 02:25:28 fvdl Exp $ */ +/* $NetBSD: uvm_aobj.c,v 1.9 1998/08/09 22:36:38 perry Exp $ */ /* * XXXCDC: "ROUGH DRAFT" QUALITY UVM PRE-RELEASE FILE! @@ -260,7 +260,7 @@ uao_find_swhash_elt(aobj, pageidx, create) LIST_INSERT_HEAD(swhash, elt, list); elt->tag = page_tag; elt->count = 0; - bzero(elt->slots, sizeof(elt->slots)); + memset(elt->slots, 0, sizeof(elt->slots)); return(elt); } @@ -505,7 +505,7 @@ uao_create(size, flags) M_UVMAOBJ, mflags); if (aobj->u_swslots == NULL) panic("uao_create: malloc swslots failed"); - bzero(aobj->u_swslots, pages * sizeof(int)); + memset(aobj->u_swslots, 0, pages * sizeof(int)); } if (flags) { diff --git a/sys/uvm/uvm_glue.c b/sys/uvm/uvm_glue.c index c87187825786..6eb29e3daa2d 100644 --- a/sys/uvm/uvm_glue.c +++ b/sys/uvm/uvm_glue.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_glue.c,v 1.11 1998/05/09 15:04:40 kleink Exp $ */ +/* $NetBSD: uvm_glue.c,v 1.12 1998/08/09 22:36:38 perry Exp $ */ /* * XXXCDC: "ROUGH DRAFT" QUALITY UVM PRE-RELEASE FILE! @@ -297,10 +297,10 @@ uvm_fork(p1, p2, shared) p2->p_stats = &up->u_stats; p2->p_sigacts = &up->u_sigacts; up->u_sigacts = *p1->p_sigacts; - bzero(&up->u_stats.pstat_startzero, + memset(&up->u_stats.pstat_startzero, 0, (unsigned) ((caddr_t)&up->u_stats.pstat_endzero - (caddr_t)&up->u_stats.pstat_startzero)); - bcopy(&p1->p_stats->pstat_startcopy, &up->u_stats.pstat_startcopy, + memcpy(&up->u_stats.pstat_startcopy, &p1->p_stats->pstat_startcopy, ((caddr_t)&up->u_stats.pstat_endcopy - (caddr_t)&up->u_stats.pstat_startcopy)); diff --git a/sys/uvm/uvm_init.c b/sys/uvm/uvm_init.c index d4c7cc86b139..30d9a75dd191 100644 --- a/sys/uvm/uvm_init.c +++ b/sys/uvm/uvm_init.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_init.c,v 1.7 1998/05/05 20:51:05 kleink Exp $ */ +/* $NetBSD: uvm_init.c,v 1.8 1998/08/09 22:36:38 perry Exp $ */ /* * XXXCDC: "ROUGH DRAFT" QUALITY UVM PRE-RELEASE FILE! @@ -93,7 +93,7 @@ uvm_init() * step 1: zero the uvm structure */ - bzero(&uvm, sizeof(uvm)); + memset(&uvm, 0, sizeof(uvm)); averunnable.fscale = FSCALE; /* diff --git a/sys/uvm/uvm_km.c b/sys/uvm/uvm_km.c index 87b370869800..cac54235b8d3 100644 --- a/sys/uvm/uvm_km.c +++ b/sys/uvm/uvm_km.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_km.c,v 1.12 1998/08/01 01:39:03 thorpej Exp $ */ +/* $NetBSD: uvm_km.c,v 1.13 1998/08/09 22:36:38 perry Exp $ */ /* * XXXCDC: "ROUGH DRAFT" QUALITY UVM PRE-RELEASE FILE! @@ -891,7 +891,7 @@ uvm_km_alloc1(map, size, zeroit) */ if (zeroit) - bzero((caddr_t)kva, loopva - kva); + memset((caddr_t)kva, 0, loopva - kva); UVMHIST_LOG(maphist,"<- done (kva=0x%x)", kva,0,0,0); return(kva); diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c index f69b1c908cea..36dd5a6770c7 100644 --- a/sys/uvm/uvm_map.c +++ b/sys/uvm/uvm_map.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_map.c,v 1.22 1998/07/08 04:28:28 thorpej Exp $ */ +/* $NetBSD: uvm_map.c,v 1.23 1998/08/09 22:36:38 perry Exp $ */ /* * XXXCDC: "ROUGH DRAFT" QUALITY UVM PRE-RELEASE FILE! @@ -246,7 +246,7 @@ uvm_mapent_copy(src, dst) vm_map_entry_t dst; { - bcopy(src, dst, ((char *)&src->uvm_map_entry_stop_copy) - ((char*)src)); + memcpy(dst, src, ((char *)&src->uvm_map_entry_stop_copy) - ((char*)src)); } /* @@ -2377,7 +2377,7 @@ uvmspace_init(vm, pmap, min, max, pageable) { UVMHIST_FUNC("uvmspace_init"); UVMHIST_CALLED(maphist); - bzero(vm, sizeof(*vm)); + memset(vm, 0, sizeof(*vm)); uvm_map_setup(&vm->vm_map, min, max, pageable); @@ -2597,7 +2597,7 @@ uvmspace_fork(vm1) vm2 = uvmspace_alloc(old_map->min_offset, old_map->max_offset, old_map->entries_pageable); - bcopy(&vm1->vm_startcopy, &vm2->vm_startcopy, + memcpy(&vm2->vm_startcopy, &vm1->vm_startcopy, (caddr_t) (vm1 + 1) - (caddr_t) &vm1->vm_startcopy); new_map = &vm2->vm_map; /* XXX */ new_pmap = new_map->pmap; diff --git a/sys/uvm/uvm_meter.c b/sys/uvm/uvm_meter.c index 9bd453e012fa..94412727ccb9 100644 --- a/sys/uvm/uvm_meter.c +++ b/sys/uvm/uvm_meter.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_meter.c,v 1.6 1998/03/09 00:58:58 mrg Exp $ */ +/* $NetBSD: uvm_meter.c,v 1.7 1998/08/09 22:36:39 perry Exp $ */ /* * XXXCDC: "ROUGH DRAFT" QUALITY UVM PRE-RELEASE FILE! @@ -168,7 +168,7 @@ uvm_total(totalp) int paging; #endif - bzero(totalp, sizeof *totalp); + memset(totalp, 0, sizeof *totalp); /* * calculate process statistics diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c index 6b6cb8cb1279..1845dc78fb59 100644 --- a/sys/uvm/uvm_page.c +++ b/sys/uvm/uvm_page.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_page.c,v 1.12 1998/07/08 04:28:28 thorpej Exp $ */ +/* $NetBSD: uvm_page.c,v 1.13 1998/08/09 22:36:39 perry Exp $ */ /* * XXXCDC: "ROUGH DRAFT" QUALITY UVM PRE-RELEASE FILE! @@ -284,7 +284,7 @@ uvm_page_init(kvm_startp, kvm_endp) (PAGE_SIZE + sizeof(struct vm_page)); pagearray = (vm_page_t)uvm_pageboot_alloc(pagecount * sizeof(struct vm_page)); - bzero(pagearray, pagecount * sizeof(struct vm_page)); + memset(pagearray, 0, pagecount * sizeof(struct vm_page)); /* * step 4: init the vm_page structures and put them in the correct @@ -306,7 +306,7 @@ uvm_page_init(kvm_startp, kvm_endp) pagecount -= n; vm_physmem[lcv].lastpg = vm_physmem[lcv].pgs + (n - 1); - /* init and free vm_pages (we've already bzero'd them) */ + /* init and free vm_pages (we've already zeroed them) */ paddr = ptoa(vm_physmem[lcv].start); for (i = 0 ; i < n ; i++, paddr += PAGE_SIZE) { vm_physmem[lcv].pgs[i].phys_addr = paddr; @@ -603,7 +603,7 @@ uvm_page_physload(start, end, avail_start, avail_end, free_list) return; } /* zero data, init phys_addr and free_list, and free pages */ - bzero(pgs, sizeof(struct vm_page) * npages); + memset(pgs, 0, sizeof(struct vm_page) * npages); for (lcv = 0, paddr = ptoa(start) ; lcv < npages ; lcv++, paddr += PAGE_SIZE) { pgs[lcv].phys_addr = paddr; diff --git a/sys/uvm/uvm_stat.h b/sys/uvm/uvm_stat.h index aa87736b3cba..22142f113fe6 100644 --- a/sys/uvm/uvm_stat.h +++ b/sys/uvm/uvm_stat.h @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_stat.h,v 1.12 1998/06/20 13:19:00 mrg Exp $ */ +/* $NetBSD: uvm_stat.h,v 1.13 1998/08/09 22:36:39 perry Exp $ */ /* * XXXCDC: "ROUGH DRAFT" QUALITY UVM PRE-RELEASE FILE! @@ -163,7 +163,7 @@ do { \ (NAME).e = (struct uvm_history_ent *) \ malloc(sizeof(struct uvm_history_ent) * (N), M_TEMP, \ M_WAITOK); \ - bzero((NAME).e, sizeof(struct uvm_history_ent) * (N)); \ + memset((NAME).e, 0, sizeof(struct uvm_history_ent) * (N)); \ LIST_INSERT_HEAD(&uvm_histories, &(NAME), list); \ } while (0) @@ -175,7 +175,7 @@ do { \ (NAME).f = 0; \ simple_lock_init(&(NAME).l); \ (NAME).e = (struct uvm_history_ent *) (BUF); \ - bzero((NAME).e, sizeof(struct uvm_history_ent) * (NAME).n); \ + memset((NAME).e, 0, sizeof(struct uvm_history_ent) * (NAME).n); \ LIST_INSERT_HEAD(&uvm_histories, &(NAME), list); \ } while (0) diff --git a/sys/uvm/uvm_swap.c b/sys/uvm/uvm_swap.c index 5a00fa12c2e4..7a515adeb4e2 100644 --- a/sys/uvm/uvm_swap.c +++ b/sys/uvm/uvm_swap.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_swap.c,v 1.13 1998/07/24 18:46:02 thorpej Exp $ */ +/* $NetBSD: uvm_swap.c,v 1.14 1998/08/09 22:36:39 perry Exp $ */ /* * Copyright (c) 1995, 1996, 1997 Matthew R. Green @@ -658,7 +658,7 @@ sys_swapctl(p, v, retval) malloc(sizeof *sdp, M_VMSWAP, M_WAITOK); spp = (struct swappri *) malloc(sizeof *spp, M_VMSWAP, M_WAITOK); - bzero(sdp, sizeof(*sdp)); + memset(sdp, 0, sizeof(*sdp)); sdp->swd_flags = SWF_FAKE; /* placeholder only */ sdp->swd_vp = vp; sdp->swd_dev = (vp->v_type == VBLK) ? vp->v_rdev : NODEV; diff --git a/sys/uvm/uvm_vnode.c b/sys/uvm/uvm_vnode.c index 62d46ac0c8f3..40ffe6362c60 100644 --- a/sys/uvm/uvm_vnode.c +++ b/sys/uvm/uvm_vnode.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_vnode.c,v 1.13 1998/07/07 23:22:13 thorpej Exp $ */ +/* $NetBSD: uvm_vnode.c,v 1.14 1998/08/09 22:36:39 perry Exp $ */ /* * XXXCDC: "ROUGH DRAFT" QUALITY UVM PRE-RELEASE FILE! @@ -1725,7 +1725,7 @@ uvn_io(uvn, pps, npages, flags, rw) if (wanted && got == 0) { result = EIO; /* XXX: error? */ } else if (got < PAGE_SIZE * npages && rw == UIO_READ) { - bzero((void *) (kva + got), (PAGE_SIZE * npages) - got); + memset((void *) (kva + got), 0, (PAGE_SIZE * npages) - got); } }