diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-04-16 12:32:56 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-04-16 12:32:56 +0300 |
commit | 5275e5560bb186bc3950a0dbf15fe0e54ee4c6ec (patch) | |
tree | 03d931e6933e884d7594f9b958a4cc7b078cd05a /Zend/zend_alloc.h | |
parent | a759967dd1c09f8553bd5dedc82673fec15acb80 (diff) | |
download | php-git-5275e5560bb186bc3950a0dbf15fe0e54ee4c6ec.tar.gz |
Changed zend_smart_str allocation granularity to do the better job together with Zend MM and avoid useless calls to erealloc().
Diffstat (limited to 'Zend/zend_alloc.h')
-rw-r--r-- | Zend/zend_alloc.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h index 6d89884f0d..0cb3a71d34 100644 --- a/Zend/zend_alloc.h +++ b/Zend/zend_alloc.h @@ -50,6 +50,20 @@ typedef struct _zend_leak_info { uint orig_lineno; } zend_leak_info; +#if ZEND_DEBUG +typedef struct _zend_mm_debug_info { + size_t size; + const char *filename; + const char *orig_filename; + uint lineno; + uint orig_lineno; +} zend_mm_debug_info; + +# define ZEND_MM_OVERHEAD ZEND_MM_ALIGNED_SIZE(sizeof(zend_mm_debug_info)) +#else +# define ZEND_MM_OVERHEAD 0 +#endif + BEGIN_EXTERN_C() ZEND_API char* ZEND_FASTCALL zend_strndup(const char *s, size_t length) ZEND_ATTRIBUTE_MALLOC; |