This is a small piece broken off of the change under review at D19826. Passing a parameter to vm_map_entry_resize_free that describes the amount of resizing reduces the number of functions changing the vm_map invariants regarding the max_free field of map entries.
Details
Details
I've tested with a test program that pounds the vm_map and seen no obvious performance impact from this change.
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
Other than the note about if()s, this looks fine.
| vm_map.c | ||
|---|---|---|
| 4325 | I find this nesting of if()s cleaner than repeated condition in your variant. It is clear that we do some cleanup, and the kind of cleanup depends on gap_deleted. | |
| vm_map.c | ||
|---|---|---|
| 4353 | Did you delete the wrong line? | |
| vm_map.c | ||
|---|---|---|
| 4353 | Yep. | |
| vm_map.c | ||
|---|---|---|
| 1254 | I think the type should be vm_size_t but I see that I myself used it inconsistently. | |