parent
ea90800e56
commit
13f16e3e09
|
@ -224,6 +224,7 @@ gc_free(pic_state *pic, union header *bp)
|
|||
union header *freep, *p;
|
||||
|
||||
assert(bp != NULL);
|
||||
assert(bp->s.size > 1);
|
||||
|
||||
freep = pic->heap->freep;
|
||||
for (p = freep; ! (bp > p && bp < p->s.ptr); p = p->s.ptr) {
|
||||
|
@ -238,7 +239,7 @@ gc_free(pic_state *pic, union header *bp)
|
|||
else {
|
||||
bp->s.ptr = p->s.ptr;
|
||||
}
|
||||
if (p + p->s.size == bp) {
|
||||
if (p + p->s.size == bp && p->s.size > 1) {
|
||||
p->s.size += bp->s.size;
|
||||
p->s.ptr = bp->s.ptr;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue