diff options
author | Andrey Hristov <andrey@php.net> | 2010-04-01 13:26:41 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2010-04-01 13:26:41 +0000 |
commit | f534df710efbe6a4450f74930e2666d3baaf57c3 (patch) | |
tree | fa065911bba8b37580ebd1363760f5e5d294b2f9 /ext/mysqlnd/mysqlnd_statistics.c | |
parent | a712d9cefb1015803e22d76110edd3290226544d (diff) | |
download | php-git-f534df710efbe6a4450f74930e2666d3baaf57c3.tar.gz |
Fix inconsistencies
- memory allocated with spprintf, or likes, outside of mysqlnd's
allocator functions should not be freed by the mysqlnd's allocator
(a wrapper around emalloc/malloc).
- memory allocated by the mysqlnd's allocator should only be freed
by it.
- add a mode to track memory usage (malloc/free)
Diffstat (limited to 'ext/mysqlnd/mysqlnd_statistics.c')
-rw-r--r-- | ext/mysqlnd/mysqlnd_statistics.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/ext/mysqlnd/mysqlnd_statistics.c b/ext/mysqlnd/mysqlnd_statistics.c index 2e7665d8a7..8e34de4024 100644 --- a/ext/mysqlnd/mysqlnd_statistics.c +++ b/ext/mysqlnd/mysqlnd_statistics.c @@ -99,19 +99,21 @@ const MYSQLND_STRING mysqlnd_stats_values_names[STAT_LAST] = { STR_W_LEN("explicit_stmt_close") }, { STR_W_LEN("implicit_stmt_close") }, { STR_W_LEN("mem_emalloc_count") }, - { STR_W_LEN("mem_emalloc_ammount") }, + { STR_W_LEN("mem_emalloc_amount") }, { STR_W_LEN("mem_ecalloc_count") }, - { STR_W_LEN("mem_ecalloc_ammount") }, + { STR_W_LEN("mem_ecalloc_amount") }, { STR_W_LEN("mem_erealloc_count") }, - { STR_W_LEN("mem_erealloc_ammount") }, + { STR_W_LEN("mem_erealloc_amount") }, { STR_W_LEN("mem_efree_count") }, + { STR_W_LEN("mem_efree_amount") }, { STR_W_LEN("mem_malloc_count") }, - { STR_W_LEN("mem_malloc_ammount") }, + { STR_W_LEN("mem_malloc_amount") }, { STR_W_LEN("mem_calloc_count") }, - { STR_W_LEN("mem_calloc_ammount") }, + { STR_W_LEN("mem_calloc_amount") }, { STR_W_LEN("mem_realloc_count") }, - { STR_W_LEN("mem_realloc_ammount") }, + { STR_W_LEN("mem_realloc_amount") }, { STR_W_LEN("mem_free_count") }, + { STR_W_LEN("mem_free_amount") }, { STR_W_LEN("mem_estrndup_count") }, { STR_W_LEN("mem_strndup_count") }, { STR_W_LEN("mem_estndup_count") }, |