Home | History | Annotate | Download | only in util

Lines Matching refs:newblock

111    struct mem_block *newblock;
113 /* break left [p, newblock, p->next], then p = newblock */
115 newblock = CALLOC_STRUCT(mem_block);
116 if (!newblock)
118 newblock->ofs = startofs;
119 newblock->size = p->size - (startofs - p->ofs);
120 newblock->free = 1;
121 newblock->heap = p->heap;
123 newblock->next = p->next;
124 newblock->prev = p;
125 p->next->prev = newblock;
126 p->next = newblock;
128 newblock->next_free = p->next_free;
129 newblock->prev_free = p;
130 p->next_free->prev_free = newblock;
131 p->next_free = newblock;
133 p->size -= newblock->size;
134 p = newblock;
137 /* break right, also [p, newblock, p->next] */
139 newblock = CALLOC_STRUCT(mem_block);
140 if (!newblock)
142 newblock->ofs = startofs + size;
143 newblock->size = p->size - size;
144 newblock->free = 1;
145 newblock->heap = p->heap;
147 newblock->next = p->next;
148 newblock->prev = p;
149 p->next->prev = newblock;
150 p->next = newblock;
152 newblock->next_free = p->next_free;
153 newblock->prev_free = p;
154 p->next_free->prev_free = newblock;
155 p->next_free = newblock;