Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/uvm pullup 1.20->1.21 (cgd)
details: https://anonhg.NetBSD.org/src/rev/6acc4b4fe50f
branches: netbsd-1-4
changeset: 469193:6acc4b4fe50f
user: perry <perry%NetBSD.org@localhost>
date: Wed Jul 07 00:07:13 1999 +0000
description:
pullup 1.20->1.21 (cgd)
diffstat:
sys/uvm/uvm_amap.c | 37 +++++++++++++++++++++----------------
1 files changed, 21 insertions(+), 16 deletions(-)
diffs (53 lines):
diff -r e6935c125081 -r 6acc4b4fe50f sys/uvm/uvm_amap.c
--- a/sys/uvm/uvm_amap.c Wed Jul 07 00:01:45 1999 +0000
+++ b/sys/uvm/uvm_amap.c Wed Jul 07 00:07:13 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_amap.c,v 1.19.2.1 1999/04/16 16:26:48 chs Exp $ */
+/* $NetBSD: uvm_amap.c,v 1.19.2.2 1999/07/07 00:07:13 perry Exp $ */
/*
*
@@ -191,23 +191,28 @@
amap->am_maxslot = totalslots;
amap->am_nslot = slots;
amap->am_nused = 0;
- MALLOC(amap->am_slots, int *, totalslots * sizeof(int), M_UVMAMAP, waitf);
- if (amap->am_slots) {
- MALLOC(amap->am_bckptr, int *, totalslots * sizeof(int), M_UVMAMAP, waitf);
- if (amap->am_bckptr) {
- MALLOC(amap->am_anon, struct vm_anon **,
- totalslots * sizeof(struct vm_anon *), M_UVMAMAP, waitf);
- }
- }
+
+ amap->am_slots = malloc(totalslots * sizeof(int), M_UVMAMAP,
+ waitf);
+ if (amap->am_slots == NULL)
+ goto fail1;
+
+ amap->am_bckptr = malloc(totalslots * sizeof(int), M_UVMAMAP, waitf);
+ if (amap->am_bckptr == NULL)
+ goto fail2;
- if (amap->am_anon)
- return(amap);
+ amap->am_anon = malloc(totalslots * sizeof(struct vm_anon *),
+ M_UVMAMAP, waitf);
+ if (amap->am_anon == NULL)
+ goto fail3;
- if (amap->am_slots) {
- FREE(amap->am_slots, M_UVMAMAP);
- if (amap->am_bckptr)
- FREE(amap->am_bckptr, M_UVMAMAP);
- }
+ return(amap);
+
+fail3:
+ free(amap->am_bckptr, M_UVMAMAP);
+fail2:
+ free(amap->am_slots, M_UVMAMAP);
+fail1:
pool_put(&uvm_amap_pool, amap);
return (NULL);
}
Home |
Main Index |
Thread Index |
Old Index