Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm MALLOC() is not to be used for variable-sized alloca...
details: https://anonhg.NetBSD.org/src/rev/e5afa71a2ba6
branches: trunk
changeset: 495666:e5afa71a2ba6
user: thorpej <thorpej%NetBSD.org@localhost>
date: Wed Aug 02 20:25:11 2000 +0000
description:
MALLOC() is not to be used for variable-sized allocations.
diffstat:
sys/uvm/uvm_page.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (20 lines):
diff -r 5d08481c0ab3 -r e5afa71a2ba6 sys/uvm/uvm_page.c
--- a/sys/uvm/uvm_page.c Wed Aug 02 20:23:45 2000 +0000
+++ b/sys/uvm/uvm_page.c Wed Aug 02 20:25:11 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_page.c,v 1.39 2000/06/27 17:29:31 mrg Exp $ */
+/* $NetBSD: uvm_page.c,v 1.40 2000/08/02 20:25:11 thorpej Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -642,8 +642,8 @@
/* XXXCDC: need some sort of lockout for this case */
paddr_t paddr;
npages = end - start; /* # of pages */
- MALLOC(pgs, struct vm_page *, sizeof(struct vm_page) * npages,
- M_VMPAGE, M_NOWAIT);
+ pgs = malloc(sizeof(struct vm_page) * npages,
+ M_VMPAGE, M_NOWAIT);
if (pgs == NULL) {
printf("vm_page_physload: can not malloc vm_page "
"structs for segment\n");
Home |
Main Index |
Thread Index |
Old Index