summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/vm/vm_map.c4
-rw-r--r--sys/vm/vm_object.c9
-rw-r--r--sys/vm/vm_object.h2
3 files changed, 6 insertions, 9 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 3d17f97..3585b8a 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -806,7 +806,7 @@ vm_map_insert(vm_map_t map, vm_object_t object, vm_ooffset_t offset,
(prev_entry->wired_count == 0) &&
((prev_entry->object.vm_object == NULL) ||
vm_object_coalesce(prev_entry->object.vm_object,
- OFF_TO_IDX(prev_entry->offset),
+ prev_entry->offset,
(vm_size_t)(prev_entry->end - prev_entry->start),
(vm_size_t)(end - prev_entry->end)))) {
/*
@@ -2781,7 +2781,7 @@ Retry:
/* Grow the underlying object if applicable. */
if (stack_entry->object.vm_object == NULL ||
vm_object_coalesce(stack_entry->object.vm_object,
- OFF_TO_IDX(stack_entry->offset),
+ stack_entry->offset,
(vm_size_t)(stack_entry->end - stack_entry->start),
(vm_size_t)grow_amount)) {
map->size += (addr - stack_entry->end);
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 01540f9..8735156 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -1824,17 +1824,14 @@ again:
* Parameters:
* prev_object First object to coalesce
* prev_offset Offset into prev_object
- * next_object Second object into coalesce
- * next_offset Offset into next_object
- *
* prev_size Size of reference to prev_object
- * next_size Size of reference to next_object
+ * next_size Size of reference to the second object
*
* Conditions:
* The object must *not* be locked.
*/
boolean_t
-vm_object_coalesce(vm_object_t prev_object, vm_pindex_t prev_pindex,
+vm_object_coalesce(vm_object_t prev_object, vm_ooffset_t prev_offset,
vm_size_t prev_size, vm_size_t next_size)
{
vm_pindex_t next_pindex;
@@ -1865,7 +1862,7 @@ vm_object_coalesce(vm_object_t prev_object, vm_pindex_t prev_pindex,
prev_size >>= PAGE_SHIFT;
next_size >>= PAGE_SHIFT;
- next_pindex = prev_pindex + prev_size;
+ next_pindex = OFF_TO_IDX(prev_offset) + prev_size;
if ((prev_object->ref_count > 1) &&
(prev_object->size != next_pindex)) {
diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h
index 52ba63c..64e4d76 100644
--- a/sys/vm/vm_object.h
+++ b/sys/vm/vm_object.h
@@ -200,7 +200,7 @@ void vm_object_pip_wait(vm_object_t object, char *waitid);
vm_object_t vm_object_allocate (objtype_t, vm_pindex_t);
vm_object_t vm_object_allocate_wait (objtype_t, vm_pindex_t, int);
void _vm_object_allocate (objtype_t, vm_pindex_t, vm_object_t);
-boolean_t vm_object_coalesce (vm_object_t, vm_pindex_t, vm_size_t, vm_size_t);
+boolean_t vm_object_coalesce(vm_object_t, vm_ooffset_t, vm_size_t, vm_size_t);
void vm_object_collapse (vm_object_t);
void vm_object_deallocate (vm_object_t);
void vm_object_terminate (vm_object_t);
OpenPOWER on IntegriCloud