Skip to content

zend_alloc: Fix compilation with ZEND_MM_CUSTOM=0 #18808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Zend/zend_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2400,7 +2400,6 @@ static void zend_mm_check_leaks(zend_mm_heap *heap)
static void *tracked_malloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
static void tracked_free_all(zend_mm_heap *heap);
static void *poison_malloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
#endif

static void zend_mm_check_freelists(zend_mm_heap *heap)
{
Expand All @@ -2411,6 +2410,7 @@ static void zend_mm_check_freelists(zend_mm_heap *heap)
}
}
}
#endif

ZEND_API void zend_mm_shutdown(zend_mm_heap *heap, bool full, bool silent)
{
Expand Down Expand Up @@ -3041,7 +3041,6 @@ static void tracked_free_all(zend_mm_heap *heap) {
free(ptr);
} ZEND_HASH_FOREACH_END();
}
#endif

static void* poison_malloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
Expand Down Expand Up @@ -3236,6 +3235,7 @@ static void poison_enable(zend_mm_heap *heap, char *parameters)
zend_mm_set_custom_handlers_ex(heap, poison_malloc, poison_free,
poison_realloc, poison_gc, poison_shutdown);
}
#endif

static void alloc_globals_ctor(zend_alloc_globals *alloc_globals)
{
Expand Down