mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
GC cleanup
This commit is contained in:
parent
120dfd1e04
commit
cb411f024d
1 changed files with 4 additions and 10 deletions
|
@ -585,16 +585,10 @@ static int gc_collect_roots(TSRMLS_D)
|
||||||
GC_G(to_free).prev->next = &GC_G(to_free);
|
GC_G(to_free).prev->next = &GC_G(to_free);
|
||||||
} else {
|
} else {
|
||||||
/* add roots into list to free */
|
/* add roots into list to free */
|
||||||
//???
|
GC_G(to_free).prev->next = GC_G(roots).next;
|
||||||
gc_root_buffer *p1 = GC_G(to_free).next;
|
GC_G(roots).next->prev = GC_G(to_free).prev;
|
||||||
gc_root_buffer *p2 = GC_G(to_free).prev;
|
GC_G(roots).prev->next = &GC_G(to_free);
|
||||||
gc_root_buffer *p3 = GC_G(roots).next;
|
GC_G(to_free).prev = GC_G(roots).prev;
|
||||||
gc_root_buffer *p4 = GC_G(roots).prev;
|
|
||||||
|
|
||||||
p2->next = p3;
|
|
||||||
p3->prev = p2;
|
|
||||||
p4->next = &GC_G(to_free);
|
|
||||||
GC_G(to_free).prev = p4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GC_G(roots).next = &GC_G(roots);
|
GC_G(roots).next = &GC_G(roots);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue