diff options
author | Monty <monty@mariadb.org> | 2018-02-02 11:08:36 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2018-02-02 11:08:36 +0200 |
commit | d69642deddf4f8d51f8c6807361576451334f1f9 (patch) | |
tree | 4b20cf71f484a31fabbfbd85f2173cc1fea5be05 /include/my_sys.h | |
parent | 1e5e3d562b867ae83c3fbb003465e1596c748690 (diff) | |
download | mariadb-git-d69642deddf4f8d51f8c6807361576451334f1f9.tar.gz |
Added name to MEM_ROOT for esier debugging
This will make it easier to how memory allocation is done when debugging
with either DBUG or gdb.
Will especially help when debugging stored procedures
Main change is a name argument as second argument to init_alloc_root()
init_sql_alloc()
Other things:
- Added DBUG_ENTER/EXIT to some Virtual_tmp_table functions
Diffstat (limited to 'include/my_sys.h')
-rw-r--r-- | include/my_sys.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/my_sys.h b/include/my_sys.h index 99c1dacfcaa..537be951e26 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -894,8 +894,9 @@ extern void my_free_lock(void *ptr); #define alloc_root_inited(A) ((A)->min_malloc != 0) #define ALLOC_ROOT_MIN_BLOCK_SIZE (MALLOC_OVERHEAD + sizeof(USED_MEM) + 8) #define clear_alloc_root(A) do { (A)->free= (A)->used= (A)->pre_alloc= 0; (A)->min_malloc=0;} while(0) -extern void init_alloc_root(MEM_ROOT *mem_root, size_t block_size, - size_t pre_alloc_size, myf my_flags); +extern void init_alloc_root(MEM_ROOT *mem_root, const char *name, + size_t block_size, size_t pre_alloc_size, + myf my_flags); extern void *alloc_root(MEM_ROOT *mem_root, size_t Size); extern void *multi_alloc_root(MEM_ROOT *mem_root, ...); extern void free_root(MEM_ROOT *root, myf MyFLAGS); |