MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vm_map_lookup_clip_start

Function vm_map_lookup_clip_start

freebsd/vm/vm_map.c:2506–2528  ·  view source on GitHub ↗

* vm_map_lookup_clip_start: * * Find the entry at or just after 'start', and clip it if 'start' is in * the interior of the entry. Return entry after 'start', and in * prev_entry set the entry before 'start'. */

Source from the content-addressed store, hash-verified

2504 * prev_entry set the entry before 'start'.
2505 */
2506static int
2507vm_map_lookup_clip_start(vm_map_t map, vm_offset_t start,
2508 vm_map_entry_t *res_entry, vm_map_entry_t *prev_entry)
2509{
2510 vm_map_entry_t entry;
2511 int rv;
2512
2513 if (!map->system_map)
2514 WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL,
2515 "%s: map %p start 0x%jx prev %p", __func__, map,
2516 (uintmax_t)start, prev_entry);
2517
2518 if (vm_map_lookup_entry(map, start, prev_entry)) {
2519 entry = *prev_entry;
2520 rv = vm_map_clip_start(map, entry, start);
2521 if (rv != KERN_SUCCESS)
2522 return (rv);
2523 *prev_entry = vm_map_entry_pred(entry);
2524 } else
2525 entry = vm_map_entry_succ(*prev_entry);
2526 *res_entry = entry;
2527 return (KERN_SUCCESS);
2528}
2529
2530/*
2531 * vm_map_clip_end: [ internal use only ]

Callers 3

vm_map_madviseFunction · 0.85
vm_map_inheritFunction · 0.85
vm_map_deleteFunction · 0.85

Calls 4

vm_map_lookup_entryFunction · 0.85
vm_map_clip_startFunction · 0.85
vm_map_entry_predFunction · 0.85
vm_map_entry_succFunction · 0.85

Tested by

no test coverage detected