Lines Matching defs:hint
233 KASSERT((entry) != (map)->hint); \
242 * SAVE_HINT: saves the specified entry as the hint for future lookups.
247 if ((map)->hint == (check)) \
248 (map)->hint = (value); \
535 struct vm_map_entry *hint = map->hint;
546 if (hint == e) {
560 printf("stale hint\n");
1048 * => assume sys_mmap provides enough of a "hint" to have us skip
1052 * [1] <NULL,uoffset> == uoffset is a hint for PMAP_PREFER
1182 SAVE_HINT(map, map->hint, prev_entry);
1231 * if uobj is null, then uoffset is either a VAC hint for PMAP_PREFER
1304 KASSERT(map->hint == prev_entry); /* bimerge case assumes this */
1339 SAVE_HINT(map, map->hint, prev_entry);
1600 * Update the free space hint
1709 * that we don't need to save the hint here... it is the
1710 * same hint (unless we are at the header, in which case the
1711 * hint didn't buy us anything anyway).
1714 cur = map->hint;
1720 UVMHIST_LOG(maphist,"<- got it via hint (%#jx)",
1733 SAVE_HINT(map, map->hint, *entry);
1742 SAVE_HINT(map, map->hint, *entry);
1793 vaddr_t hint = atop(*start);
1794 const u_int color = hint & colormask;
1796 hint -= color; /* adjust to color boundary */
1797 KASSERT((hint & colormask) == 0);
1800 hint -= colorsize;
1803 hint += colorsize;
1805 *start = ptoa(hint + align); /* adjust to color */
1842 vaddr_t hint, struct vm_map_entry *entry, int line)
1846 topdown ? hint <= orig_hint
1847 : hint >= orig_hint;
1850 "%s map=%p hint=%#" PRIxVADDR " %s orig_hint=%#" PRIxVADDR
1856 map, hint, topdown ? ">" : "<", orig_hint,
1868 * => "hint" is a hint about where we want it, unless UVM_FLAG_FIXED is
1869 * set in "flags" (in which case we insist on using "hint").
1879 uvm_map_findspace(struct vm_map *map, vaddr_t hint, vsize_t length,
1885 flags, hint, entry, __LINE__)
1892 UVMHIST_CALLARGS(maphist, "(map=%#jx, hint=%#jx, len=%ju, flags=%#jx...",
1893 (uintptr_t)map, hint, length, flags);
1904 * Clamp the hint to the VM map's min/max address, and remmeber
1905 * the clamped original hint. Remember the original hint,
1910 * We use the original hint to verify later that the search has
1915 if (hint < vm_map_min(map)) { /* check ranges ... */
1920 hint = vm_map_min(map);
1922 if (hint > vm_map_max(map)) {
1924 hint, vm_map_min(map), vm_map_max(map), 0);
1927 orig_hint = hint;
1931 hint, vm_map_min(map), vm_map_max(map), 0);
1934 * hint may not be aligned properly; we need round up or down it
1938 uvm_map_align_va(&hint, align, topdown);
1943 hint, vm_map_min(map), vm_map_max(map), 0);
1971 hint == (topdown ? vm_map_max(map) : vm_map_min(map))) {
1974 * topdown VM it starts with a high hint and returns a
1976 * low hint and returns a higher free address. As an
1987 * the user specifies 0 as a hint to mmap, then mmap
2001 } else if (uvm_map_lookup_entry(map, hint, &entry)) {
2002 KASSERT(entry->start <= hint);
2003 KASSERT(hint < entry->end);
2004 /* "hint" address already in use ... */
2014 KASSERT(entry == &map->header || entry->end <= hint);
2016 hint < entry->next->start);
2018 if (entry->next->start >= hint &&
2019 length <= entry->next->start - hint)
2022 /* "hint" address is gap but too small */
2028 * See if given hint fits in this gap.
2030 avail = uvm_map_space_avail(&hint, length,
2043 * if hint > entry->end.
2070 hint = vm_map_min(map); /* XXX goto wraparound? */
2072 hint = MIN(orig_hint, entry->next->start - length);
2073 KASSERT(hint >= vm_map_min(map));
2075 hint = entry->end;
2078 avail = uvm_map_space_avail(&hint, length, uoffset, align, flags,
2097 /* Find an entry close to hint that has enough space */
2101 if (tmp->next->start < hint + length &&
2110 if (tmp->end >= hint &&
2119 if (tmp->next->start < hint + length)
2121 else if (tmp->end > hint)
2136 if (tmp != NULL && tmp->start < hint && hint < tmp->next->start) {
2142 if (hint > tmp->next->start - length)
2143 hint = tmp->next->start - length;
2145 if (hint < tmp->end)
2146 hint = tmp->end;
2149 avail = uvm_map_space_avail(&hint, length, uoffset, align,
2168 hint = prev->next->start - length;
2171 hint = prev->end;
2174 avail = uvm_map_space_avail(&hint, length, uoffset, align,
2215 hint = tmp->next->start - length;
2218 hint = tmp->end;
2221 avail = uvm_map_space_avail(&hint, length, uoffset, align,
2246 /* Update hint for current gap. */
2247 hint = topdown ? MIN(orig_hint, entry->next->start - length)
2252 avail = uvm_map_space_avail(&hint, length, uoffset, align,
2281 SAVE_HINT(map, map->hint, entry);
2282 *result = hint;
2283 UVMHIST_LOG(maphist,"<- got it! (result=%#jx)", hint, 0,0,0);
2285 KASSERT(entry->end <= hint);
2286 KASSERT(hint <= entry->next->start);
2287 KASSERT(length <= entry->next->start - hint);
2338 /* critical! prevents stale hint */
2345 * save the free space hint
2469 /* critical! prevents stale hint */
2560 vaddr_t offset /* hint for pmap_prefer */,
2562 vaddr_t *raddr /* IN:hint, OUT: reserved VA */,
2676 SAVE_HINT(map, map->hint, newents);
2817 SAVE_HINT(srcmap, srcmap->hint, entry->prev);
2975 SAVE_HINT(srcmap, srcmap->hint, orig_entry->prev);
4832 map->hint = &map->header;