summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2002-07-18 10:28:00 +0000
committerpeter <peter@FreeBSD.org>2002-07-18 10:28:00 +0000
commit5d00cd5ad798f2b8ea6a569981d361088b455af7 (patch)
tree8cf2d7e50f4eb2dec1b439fd68f8543ce5c3fb88 /sys/vm
parent9e3506ab60a88bcd2d61b3fee95a0b1882d6ee93 (diff)
downloadFreeBSD-src-5d00cd5ad798f2b8ea6a569981d361088b455af7.zip
FreeBSD-src-5d00cd5ad798f2b8ea6a569981d361088b455af7.tar.gz
(VM_MAX_KERNEL_ADDRESS - KERNBASE) / PAGE_SIZE may not fit in an integer.
Use lmin(long, long), not min(u_int, u_int). This is a problem here on ia64 which has *way* more than 2^32 pages of KVA. 281474976710655 pages to be precice.
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 6b107db..bbe5af6 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -263,7 +263,7 @@ vmspace_alloc(min, max)
void
vm_init2(void)
{
- uma_zone_set_obj(kmapentzone, &kmapentobj, min(cnt.v_page_count,
+ uma_zone_set_obj(kmapentzone, &kmapentobj, lmin(cnt.v_page_count,
(VM_MAX_KERNEL_ADDRESS - KERNBASE) / PAGE_SIZE) / 8);
vmspace_zone = uma_zcreate("VMSPACE", sizeof(struct vmspace), NULL,
#ifdef INVARIANTS
OpenPOWER on IntegriCloud