diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2021-01-04 01:53:01 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2021-01-04 03:29:09 +0100 |
commit | d7278d1176391dc717293111042c3fcb56e6ca85 (patch) | |
tree | f9e2be107b876c59a46cd9d965cf0571e95713b0 /vm/vm_kern.c | |
parent | ae7bdaf9ed238500aaa91080126fff356e5e2800 (diff) | |
download | gnumach-d7278d1176391dc717293111042c3fcb56e6ca85.tar.gz gnumach-d7278d1176391dc717293111042c3fcb56e6ca85.tar.bz2 gnumach-d7278d1176391dc717293111042c3fcb56e6ca85.zip |
vm_map: Avoid linking gaps for vm_copy_t
This does not make sense, and produces incorrect results (since
vme_end is 0, etc.)
* vm/vm_map.h (_vm_map_clip_start, _vm_map_clip_end): Add link_gap
parameter.
* vm/vm_map.c (_vm_map_entry_link): Add link_gap parameter, do not call
vm_map_gap_insert if it is 0.
(vm_map_entry_link): Set link_gap to 1 in _vm_map_entry_link call.
(_vm_map_clip_start): Add link_gap parameter, pass it to
_vm_map_entry_link call..
(vm_map_clip_start): Set link_gap_to 1 in _vm_map_clip_start call.
(vm_map_copy_entry_link): Set link_gap to 0 in _vm_map_entry_link call.
(vm_map_copy_clip_start): Set link_gap_to 0 in _vm_map_clip_start call.
(_vm_map_entry_unlink): Add unlink_gap parameter, do not call
vm_map_gap_remove if it is 0.
(vm_map_entry_unlink): Set unlink_gap to 1 in _vm_map_entry_unlink call.
(_vm_map_clip_end): Add link_gap parameter, pass it to
_vm_map_entry_link call..
(vm_map_clip_end): Set link_gap_to 1 in _vm_map_clip_end call.
(vm_map_copy_entry_unlink): Set unlink_gap to 0 in _vm_map_entry_unlink call.
(vm_map_copy_clip_end): Set link_gap_to 0 in _vm_map_clip_end call.
* vm/vm_kern.c (projected_buffer_deallocate): set link_gap to 1 in
_vm_map_clip_start and _vm_map_clip_end calls.
Diffstat (limited to 'vm/vm_kern.c')
-rw-r--r-- | vm/vm_kern.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vm/vm_kern.c b/vm/vm_kern.c index 8ecd2ed9..705b0acb 100644 --- a/vm/vm_kern.c +++ b/vm/vm_kern.c @@ -271,9 +271,9 @@ projected_buffer_deallocate( /*Prepare for deallocation*/ if (entry->vme_start < start) - _vm_map_clip_start(&map->hdr, entry, start); + _vm_map_clip_start(&map->hdr, entry, start, 1); if (entry->vme_end > end) - _vm_map_clip_end(&map->hdr, entry, end); + _vm_map_clip_end(&map->hdr, entry, end, 1); if (map->first_free == entry) /*Adjust first_free hint*/ map->first_free = entry->vme_prev; entry->projected_on = 0; /*Needed to allow deletion*/ |