diff options
Diffstat (limited to 'vm')
-rw-r--r-- | vm/vm_debug.c | 6 | ||||
-rw-r--r-- | vm/vm_kern.c | 8 | ||||
-rw-r--r-- | vm/vm_object.c | 4 | ||||
-rw-r--r-- | vm/vm_resident.c | 4 |
4 files changed, 15 insertions, 7 deletions
diff --git a/vm/vm_debug.c b/vm/vm_debug.c index a6e9347..29ec8da 100644 --- a/vm/vm_debug.c +++ b/vm/vm_debug.c @@ -33,6 +33,8 @@ #if MACH_VM_DEBUG +#include <string.h> + #include <kern/thread.h> #include <mach/kern_return.h> #include <mach/machine/vm_types.h> @@ -402,8 +404,8 @@ mach_vm_object_pages(object, pagesp, countp) addr + rsize_used, size - rsize_used); if (size_used != rsize_used) - bzero((char *) (addr + size_used), - rsize_used - size_used); + memset((char *) (addr + size_used), 0, + rsize_used - size_used); kr = vm_map_copyin(ipc_kernel_map, addr, rsize_used, TRUE, ©); diff --git a/vm/vm_kern.c b/vm/vm_kern.c index b83c058..ed81f0a 100644 --- a/vm/vm_kern.c +++ b/vm/vm_kern.c @@ -34,6 +34,8 @@ * Kernel memory management. */ +#include <string.h> + #include <mach/kern_return.h> #include <machine/vm_param.h> #include <kern/assert.h> @@ -149,7 +151,7 @@ projected_buffer_allocate(map, size, persistence, kernel_p, kmem_alloc_pages(object, 0, *kernel_p, *kernel_p + size, VM_PROT_READ | VM_PROT_WRITE); - bzero(*kernel_p, size); /*Zero fill*/ + memset((void*) *kernel_p, 0, size); /*Zero fill*/ /* Set up physical mappings for user pmap */ @@ -1035,7 +1037,7 @@ int copyinmap(map, fromaddr, toaddr, length) { if (vm_map_pmap(map) == kernel_pmap) { /* assume a correct copy */ - bcopy(fromaddr, toaddr, length); + memcpy(toaddr, fromaddr, length); return 0; } @@ -1061,7 +1063,7 @@ int copyoutmap(map, fromaddr, toaddr, length) { if (vm_map_pmap(map) == kernel_pmap) { /* assume a correct copy */ - bcopy(fromaddr, toaddr, length); + memcpy(toaddr, fromaddr, length); return 0; } diff --git a/vm/vm_object.c b/vm/vm_object.c index e2a5f43..7d00fbe 100644 --- a/vm/vm_object.c +++ b/vm/vm_object.c @@ -33,6 +33,8 @@ * Virtual memory object module. */ +#include <string.h> + #include <mach/memory_object.h> #include <vm/memory_object_default.user.h> #include <vm/memory_object_user.user.h> @@ -253,7 +255,7 @@ void vm_object_bootstrap(void) */ vm_object_template = (vm_object_t) zalloc(vm_object_zone); - bzero((char *) vm_object_template, sizeof *vm_object_template); + memset(vm_object_template, 0, sizeof *vm_object_template); vm_object_template->ref_count = 1; vm_object_template->size = 0; diff --git a/vm/vm_resident.c b/vm/vm_resident.c index b939b1d..2c99ab5 100644 --- a/vm/vm_resident.c +++ b/vm/vm_resident.c @@ -33,6 +33,8 @@ * Resident memory management module. */ +#include <string.h> + #include <mach/vm_prot.h> #include <kern/counters.h> #include <kern/sched_prim.h> @@ -959,7 +961,7 @@ vm_page_grab_contiguous_pages( } else alloc_size = 0; - bzero(bits, size); + memset(bits, 0, size); /* * A very large granularity call, its rare so that is ok |