diff options
author | Andrey Hristov <andrey@php.net> | 2010-05-04 13:49:43 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2010-05-04 13:49:43 +0000 |
commit | 447c693b2d41b16019fd69046f2cfc8d9b6cc697 (patch) | |
tree | 3ce4fdbdf66d8d0cb5e3479c85bb1e6306b4d95d /ext/mysqlnd/php_mysqlnd.c | |
parent | 798aca0d834da10f688094d46dfb0909bd786891 (diff) | |
download | php-git-447c693b2d41b16019fd69046f2cfc8d9b6cc697.tar.gz |
Add possibility to control the allocator in when PHP is compiled
with debug
Diffstat (limited to 'ext/mysqlnd/php_mysqlnd.c')
-rw-r--r-- | ext/mysqlnd/php_mysqlnd.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ext/mysqlnd/php_mysqlnd.c b/ext/mysqlnd/php_mysqlnd.c index cd9048c366..6f39b3bbd9 100644 --- a/ext/mysqlnd/php_mysqlnd.c +++ b/ext/mysqlnd/php_mysqlnd.c @@ -152,6 +152,12 @@ static PHP_GINIT_FUNCTION(mysqlnd) mysqlnd_globals->net_read_timeout = 31536000; mysqlnd_globals->log_mask = 0; mysqlnd_globals->mempool_default_size = 16000; + mysqlnd_globals->debug_emalloc_fail_threshold = -1; + mysqlnd_globals->debug_ecalloc_fail_threshold = -1; + mysqlnd_globals->debug_erealloc_fail_threshold = -1; + mysqlnd_globals->debug_malloc_fail_threshold = -1; + mysqlnd_globals->debug_calloc_fail_threshold = -1; + mysqlnd_globals->debug_realloc_fail_threshold = -1; } /* }}} */ @@ -178,6 +184,16 @@ PHP_INI_BEGIN() STD_PHP_INI_ENTRY("mysqlnd.net_read_timeout", "31536000", PHP_INI_SYSTEM, OnUpdateLong, net_read_timeout, zend_mysqlnd_globals, mysqlnd_globals) STD_PHP_INI_ENTRY("mysqlnd.log_mask", "0", PHP_INI_ALL, OnUpdateLong, log_mask, zend_mysqlnd_globals, mysqlnd_globals) STD_PHP_INI_ENTRY("mysqlnd.mempool_default_size","16000", PHP_INI_ALL, OnUpdateLong, mempool_default_size, zend_mysqlnd_globals, mysqlnd_globals) + +#ifdef PHP_DEBUG + STD_PHP_INI_ENTRY("mysqlnd.debug_emalloc_fail_threshold","-1", PHP_INI_SYSTEM, OnUpdateLong, debug_emalloc_fail_threshold, zend_mysqlnd_globals, mysqlnd_globals) + STD_PHP_INI_ENTRY("mysqlnd.debug_ecalloc_fail_threshold","-1", PHP_INI_SYSTEM, OnUpdateLong, debug_ecalloc_fail_threshold, zend_mysqlnd_globals, mysqlnd_globals) + STD_PHP_INI_ENTRY("mysqlnd.debug_erealloc_fail_threshold","-1", PHP_INI_SYSTEM, OnUpdateLong, debug_erealloc_fail_threshold, zend_mysqlnd_globals, mysqlnd_globals) + + STD_PHP_INI_ENTRY("mysqlnd.debug_malloc_fail_threshold","-1", PHP_INI_SYSTEM, OnUpdateLong, debug_malloc_fail_threshold, zend_mysqlnd_globals, mysqlnd_globals) + STD_PHP_INI_ENTRY("mysqlnd.debug_calloc_fail_threshold","-1", PHP_INI_SYSTEM, OnUpdateLong, debug_calloc_fail_threshold, zend_mysqlnd_globals, mysqlnd_globals) + STD_PHP_INI_ENTRY("mysqlnd.debug_realloc_fail_threshold","-1", PHP_INI_SYSTEM, OnUpdateLong, debug_realloc_fail_threshold, zend_mysqlnd_globals, mysqlnd_globals) +#endif PHP_INI_END() /* }}} */ |