Make the code and comments for vm_object_coalesce() consistent.
This commit is contained in:
parent
6dd19a884b
commit
57a21aba93
@ -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);
|
||||
|
@ -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)) {
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user