| 949 | } |
| 950 | |
| 951 | static void |
| 952 | print_unrhdr(struct unrhdr *uh) |
| 953 | { |
| 954 | struct unr *up; |
| 955 | u_int x; |
| 956 | |
| 957 | printf( |
| 958 | "%p low = %u high = %u first = %u last = %u busy %u chunks = %u\n", |
| 959 | uh, uh->low, uh->high, uh->first, uh->last, uh->busy, uh->alloc); |
| 960 | x = uh->low + uh->first; |
| 961 | TAILQ_FOREACH(up, &uh->head, list) { |
| 962 | printf(" from = %5u", x); |
| 963 | print_unr(uh, up); |
| 964 | if (up->ptr == NULL || up->ptr == uh) |
| 965 | x += up->len; |
| 966 | else |
| 967 | x += NBITS; |
| 968 | } |
| 969 | } |
| 970 | |
| 971 | static void |
| 972 | test_alloc_unr(struct unrhdr *uh, u_int i, char a[]) |