84
85
* If we get here, we are growing. First, see whether there
85
86
* is space in the free list on top of our current chunk.
88
89
cp = (char *)ptr + fp1->sz;
90
90
for (s = 0, ofp3 = 0, fp3 = __flp;
92
92
ofp3 = fp3, fp3 = fp3->nx) {
93
93
if (fp3 == fp2 && fp3->sz >= incr) {
94
94
/* found something that fits */
97
96
/* it just fits, so use it entirely */
98
97
fp1->sz += fp3->sz + sizeof(size_t);