Skip to content

Commit 0f321b0

Browse files
committed
Do not delete main chunk in zend_gc
1 parent 08a9579 commit 0f321b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2047,7 +2047,7 @@ ZEND_API size_t zend_mm_gc(zend_mm_heap *heap)
20472047
i++;
20482048
}
20492049
}
2050-
if (chunk->free_pages == ZEND_MM_PAGES - ZEND_MM_FIRST_PAGE) {
2050+
if (chunk->free_pages == ZEND_MM_PAGES - ZEND_MM_FIRST_PAGE && chunk != heap->main_chunk) {
20512051
zend_mm_chunk *next_chunk = chunk->next;
20522052

20532053
zend_mm_delete_chunk(heap, chunk);

0 commit comments

Comments
 (0)