diff options
author | jhb <jhb@FreeBSD.org> | 2012-03-19 18:47:34 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2012-03-19 18:47:34 +0000 |
commit | 9628d3dbf8d90a560573b5f82b1e52e3b2eb4605 (patch) | |
tree | 241c7fa3e8584990822d1ad78f12a03bb221b953 /sys/vm/vm_object.c | |
parent | 2e0db42a5f7e8ff9bb190dd0a5ac5475580cb905 (diff) | |
download | FreeBSD-src-9628d3dbf8d90a560573b5f82b1e52e3b2eb4605.zip FreeBSD-src-9628d3dbf8d90a560573b5f82b1e52e3b2eb4605.tar.gz |
Fix madvise(MADV_WILLNEED) to properly handle individual mappings larger
than 4GB. Specifically, the inlined version of 'ptoa' of the the 'int'
count of pages overflowed on 64-bit platforms. While here, change
vm_object_madvise() to accept two vm_pindex_t parameters (start and end)
rather than a (start, count) tuple to match other VM APIs as suggested
by alc@.
Diffstat (limited to 'sys/vm/vm_object.c')
-rw-r--r-- | sys/vm/vm_object.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 816810a..881c344 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -1065,16 +1065,16 @@ vm_object_sync(vm_object_t object, vm_ooffset_t offset, vm_size_t size, * without I/O. */ void -vm_object_madvise(vm_object_t object, vm_pindex_t pindex, int count, int advise) +vm_object_madvise(vm_object_t object, vm_pindex_t pindex, vm_pindex_t end, + int advise) { - vm_pindex_t end, tpindex; + vm_pindex_t tpindex; vm_object_t backing_object, tobject; vm_page_t m; if (object == NULL) return; VM_OBJECT_LOCK(object); - end = pindex + count; /* * Locate and adjust resident pages */ |