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

Function vm_map_find_aligned

freebsd/vm/vm_map.c:2101–2112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2099}
2100
2101int
2102vm_map_find_aligned(vm_map_t map, vm_offset_t *addr, vm_size_t length,
2103 vm_offset_t max_addr, vm_offset_t alignment)
2104{
2105 /* XXXKIB ASLR eh ? */
2106 *addr = vm_map_findspace(map, *addr, length);
2107 if (*addr + length > vm_map_max(map) ||
2108 (max_addr != 0 && *addr + length > max_addr))
2109 return (KERN_NO_SPACE);
2110 return (vm_map_alignspace(map, NULL, 0, addr, length, max_addr,
2111 alignment));
2112}
2113
2114/*
2115 * vm_map_find finds an unallocated region in the target address

Callers 1

shm_mmap_largeFunction · 0.85

Calls 3

vm_map_findspaceFunction · 0.85
vm_map_maxFunction · 0.85
vm_map_alignspaceFunction · 0.85

Tested by

no test coverage detected