mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Fixed phpdbg build
This commit is contained in:
parent
8e9b4b5aa7
commit
0604df8a82
@ -2499,7 +2499,7 @@ ZEND_API zend_mm_heap *zend_mm_startup(void)
|
||||
return zend_mm_init();
|
||||
}
|
||||
|
||||
ZEND_API zend_mm_heap *zend_mm_startup_ex(zend_mm_handlers *handlers, void *data, size_t data_size)
|
||||
ZEND_API zend_mm_heap *zend_mm_startup_ex(const zend_mm_handlers *handlers, void *data, size_t data_size)
|
||||
{
|
||||
#if ZEND_MM_STORAGE
|
||||
zend_mm_storage tmp_storage, *storage;
|
||||
|
@ -310,7 +310,7 @@ struct _zend_mm_storage {
|
||||
};
|
||||
|
||||
ZEND_API zend_mm_storage *zend_mm_get_storage(zend_mm_heap *heap);
|
||||
ZEND_API zend_mm_heap *zend_mm_startup_ex(zend_mm_handlers *handlers, void *data, size_t data_size);
|
||||
ZEND_API zend_mm_heap *zend_mm_startup_ex(const zend_mm_handlers *handlers, void *data, size_t data_size);
|
||||
|
||||
/*
|
||||
|
||||
|
@ -29,13 +29,17 @@ static void zend_mm_mem_free(zend_mm_storage *storage, void *ptr, size_t size) {
|
||||
|
||||
void phpdbg_set_sigsafe_mem(char *buffer) {
|
||||
phpdbg_signal_safe_mem *mem = &PHPDBG_G(sigsafe_mem);
|
||||
const zend_mm_handlers phpdbg_handlers = {
|
||||
zend_mm_mem_alloc,
|
||||
zend_mm_mem_free,
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
||||
|
||||
mem->mem = buffer;
|
||||
mem->allocated = 0;
|
||||
|
||||
mem->storage.chunk_alloc = zend_mm_mem_alloc;
|
||||
mem->storage.chunk_free = zend_mm_mem_free;
|
||||
|
||||
mem->heap = zend_mm_startup_ex(&mem->storage);
|
||||
mem->heap = zend_mm_startup_ex(&phpdbg_handlers, NULL, 0);
|
||||
|
||||
mem->old_heap = zend_mm_set_heap(mem->heap);
|
||||
}
|
||||
|
@ -13,7 +13,6 @@ typedef struct {
|
||||
zend_bool allocated;
|
||||
zend_mm_heap *heap;
|
||||
zend_mm_heap *old_heap;
|
||||
zend_mm_storage storage;
|
||||
} phpdbg_signal_safe_mem;
|
||||
|
||||
#include "phpdbg.h"
|
||||
|
Loading…
Reference in New Issue
Block a user