Lines Matching refs:next

248 	struct memscrub_page_retire_span	*next;
655 * when appropriate, address will be rounded up to start of next
690 /* else go to next struct memlist */
768 struct memlist *prev, *next;
800 for (prev = NULL, next = *list;
801 next != NULL;
802 prev = next, next = next->ml_next) {
803 if (address > (next->ml_address + next->ml_size))
811 * prepend to next
813 if ((address + bytes) == next->ml_address) {
816 next->ml_address = address;
817 next->ml_size += bytes;
823 * append to next
825 if (address == (next->ml_address + next->ml_size)) {
828 if (next->ml_next) {
830 * don't overlap with next->ml_next
833 next->ml_next->ml_address) {
838 * concatenate next and next->ml_next
841 next->ml_next->ml_address) {
842 struct memlist *mlp = next->ml_next;
844 if (next == *list)
845 *list = next->ml_next;
847 mlp->ml_address = next->ml_address;
848 mlp->ml_size += next->ml_size;
851 if (next->ml_prev)
852 next->ml_prev->ml_next = mlp;
853 mlp->ml_prev = next->ml_prev;
855 kmem_free(next,
861 next->ml_size += bytes;
866 /* don't overlap with next */
867 if ((address + bytes) > next->ml_address) {
874 * insert before next
877 dst->ml_next = next;
878 next->ml_prev = dst;
888 * end of list, prev is valid and next is NULL
911 struct memlist *dst, *next;
926 for (next = memscrub_memlist; next != NULL; next = next->ml_next) {
927 if ((address >= next->ml_address) &&
928 (address < next->ml_address + next->ml_size))
935 if (next == NULL) {
943 if (address + bytes > next->ml_address + next->ml_size) {
951 if (address == next->ml_address) {
955 if (bytes == next->ml_size) {
956 if (next == memscrub_memlist)
957 memscrub_memlist = next->ml_next;
958 if (next->ml_prev != NULL)
959 next->ml_prev->ml_next = next->ml_next;
960 if (next->ml_next != NULL)
961 next->ml_next->ml_prev = next->ml_prev;
963 kmem_free(next, sizeof (struct memlist));
968 next->ml_address += bytes;
969 next->ml_size -= bytes;
977 if (address + bytes == next->ml_address + next->ml_size) {
981 next->ml_size -= bytes;
1006 (next->ml_address + next->ml_size) - dst->ml_address;
1007 next->ml_size = address - next->ml_address;
1017 dst->ml_next = next->ml_next;
1018 dst->ml_prev = next;
1020 if (next->ml_next != NULL)
1021 next->ml_next->ml_prev = dst;
1022 next->ml_next = dst;
1261 new_span->next = memscrub_page_retire_span_list;
1275 next_span = memscrub_page_retire_span_list->next;
1285 prev_span->next = next_span->next;
1291 next_span = next_span->next;
1307 next_span = next_span->next;
1319 memscrub_page_retire_span_t *prev, *cur, *next;
1325 next = cur->next;
1330 memscrub_page_retire_span_list = next;
1335 prev->next = cur->next;
1338 cur = next;
1342 cur = next;
1345 next = cur->next;