Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Explicitly panic if failed to allocate some memory d...
details: https://anonhg.NetBSD.org/src/rev/51ef09196809
branches: trunk
changeset: 503153:51ef09196809
user: enami <enami%NetBSD.org@localhost>
date: Fri Feb 02 01:55:52 2001 +0000
description:
Explicitly panic if failed to allocate some memory during initialization.
diffstat:
sys/uvm/uvm_bio.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (27 lines):
diff -r b1f36f6572a8 -r 51ef09196809 sys/uvm/uvm_bio.c
--- a/sys/uvm/uvm_bio.c Thu Feb 01 21:22:55 2001 +0000
+++ b/sys/uvm/uvm_bio.c Fri Feb 02 01:55:52 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_bio.c,v 1.6 2000/12/27 09:01:45 chs Exp $ */
+/* $NetBSD: uvm_bio.c,v 1.7 2001/02/02 01:55:52 enami Exp $ */
/*
* Copyright (c) 1998 Chuck Silvers.
@@ -145,6 +145,8 @@
ubc_object.umap = malloc(ubc_nwins * sizeof(struct ubc_map),
M_TEMP, M_NOWAIT);
+ if (ubc_object.umap == NULL)
+ panic("ubc_init: failed to allocate ubc_map");
bzero(ubc_object.umap, ubc_nwins * sizeof(struct ubc_map));
va = (vaddr_t)1L;
@@ -161,6 +163,8 @@
ubc_object.inactive = malloc(UBC_NQUEUES *
sizeof(struct ubc_inactive_head),
M_TEMP, M_NOWAIT);
+ if (ubc_object.inactive == NULL)
+ panic("ubc_init: failed to allocate inactive queue heads");
for (i = 0; i < UBC_NQUEUES; i++) {
TAILQ_INIT(&ubc_object.inactive[i]);
}
Home |
Main Index |
Thread Index |
Old Index