-/* $OpenBSD: kern_malloc.c,v 1.144 2021/02/23 13:50:16 jsg Exp $ */
+/* $OpenBSD: kern_malloc.c,v 1.145 2021/04/21 10:02:05 mpi Exp $ */
/* $NetBSD: kern_malloc.c,v 1.15.4.2 1996/06/13 17:10:56 cgd Exp $ */
/*
FALSE, &kmem_map_store);
kmembase = (char *)base;
kmemlimit = (char *)limit;
- kmemusage = (struct kmemusage *) uvm_km_zalloc(kernel_map,
- (vsize_t)(nkmempages * sizeof(struct kmemusage)));
+ kmemusage = km_alloc(round_page(nkmempages * sizeof(struct kmemusage)),
+ &kv_any, &kp_zero, &kd_waitok);
for (indx = 0; indx < MINBUCKET + 16; indx++) {
XSIMPLEQ_INIT(&bucket[indx].kb_freelist);
}
-/* $OpenBSD: uvm_page.c,v 1.156 2021/03/26 13:40:05 mpi Exp $ */
+/* $OpenBSD: uvm_page.c,v 1.157 2021/04/21 10:02:05 mpi Exp $ */
/* $NetBSD: uvm_page.c,v 1.44 2000/11/27 08:40:04 chs Exp $ */
/*
npages = end - start; /* # of pages */
- pgs = (struct vm_page *)uvm_km_zalloc(kernel_map,
- npages * sizeof(*pgs));
+ pgs = km_alloc(npages * sizeof(*pgs), &kv_any, &kp_zero,
+ &kd_waitok);
if (pgs == NULL) {
printf("uvm_page_physload: can not malloc vm_page "
"structs for segment\n");