Lines Matching refs:offset
23 * Returns offset in the map or -1 if out of space.
29 int offset, count; /* siamese twins */
54 offset = t->first_free;
56 offset = t->last_off & ~align1;
59 off_new = find_next_zero_bit(t->map, t->size, offset);
61 count += off_new - offset;
62 offset = off_new;
63 if (offset >= t->size)
64 offset = 0;
69 t->size, t->used, offset, len, align, count);
73 if (offset + len > t->size) {
74 count += t->size - offset;
75 offset = 0;
80 while (test_bit(offset + i, t->map) == 0) {
84 __set_bit(offset + i, t->map);
85 if (offset == t->first_free)
89 if ((t->last_off = offset + len) >= t->size)
94 return offset;
98 if ((offset += i + 1) >= t->size)
99 offset = 0;
103 void bit_map_clear(struct bit_map *t, int offset, int len)
111 if (test_bit(offset + i, t->map) == 0)
113 __clear_bit(offset + i, t->map);
115 if (offset < t->first_free)
116 t->first_free = offset;