diff options
author | gallatin <gallatin@FreeBSD.org> | 2004-06-28 19:15:40 +0000 |
---|---|---|
committer | gallatin <gallatin@FreeBSD.org> | 2004-06-28 19:15:40 +0000 |
commit | 81e93410351409b1954c0265486eb5f3a9241814 (patch) | |
tree | b12d7845a8b67dbf8d1502a2c23af4cd2ead0150 /sys/vm | |
parent | 59c665eab0d642dc56ca0c0d2150017dbc1c80c0 (diff) | |
download | FreeBSD-src-81e93410351409b1954c0265486eb5f3a9241814.zip FreeBSD-src-81e93410351409b1954c0265486eb5f3a9241814.tar.gz |
Fix alpha - the use of min() on longs was loosing the high bits and
returning wrong answers, leading to strange values vm2->vm_{s,t,d}size.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_map.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index df47991..e15cf09 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -2360,12 +2360,12 @@ vmspace_map_entry_forked(const struct vmspace *vm1, struct vmspace *vm2, vm2->vm_ssize += btoc(entrysize); } else if (entry->start >= (vm_offset_t)vm1->vm_daddr && entry->start < (vm_offset_t)vm1->vm_daddr + ctob(vm1->vm_dsize)) { - newend = min(entry->end, + newend = ulmin(entry->end, (vm_offset_t)vm1->vm_daddr + ctob(vm1->vm_dsize)); - vm2->vm_dsize += btoc(newend - entry->start); + vm2->vm_dsize += btoc(newend - entry->start); } else if (entry->start >= (vm_offset_t)vm1->vm_taddr && entry->start < (vm_offset_t)vm1->vm_taddr + ctob(vm1->vm_tsize)) { - newend = min(entry->end, + newend = ulmin(entry->end, (vm_offset_t)vm1->vm_taddr + ctob(vm1->vm_tsize)); vm2->vm_tsize += btoc(newend - entry->start); } |