mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
merge with 4.0 for more memory allocation variables.
configure.in: Auto merged mysql-test/r/variables.result: Auto merged mysql-test/t/variables.test: Auto merged sql/ha_berkeley.cc: Auto merged sql/mysql_priv.h: Auto merged sql/opt_range.h: Auto merged sql/sql_acl.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_test.cc: Auto merged sql/sql_udf.cc: Auto merged sql/sql_update.cc: Auto merged sql/table.cc: Auto merged scripts/Makefile.am: merge sql/log_event.cc: merge sql/mysqld.cc: merge sql/opt_range.cc: merge sql/set_var.cc: merge sql/sql_class.h: merge sql/sql_delete.cc: merge sql/sql_parse.cc: merge
This commit is contained in:
@ -22,6 +22,7 @@
|
||||
#include "sql_select.h"
|
||||
#include <hash.h>
|
||||
#include <thr_alarm.h>
|
||||
#include <malloc.h>
|
||||
|
||||
/* Intern key cache variables */
|
||||
extern "C" pthread_mutex_t THR_LOCK_keycache;
|
||||
@ -365,6 +366,32 @@ Next alarm time: %lu\n",
|
||||
thd->proc_info="malloc";
|
||||
my_checkmalloc();
|
||||
TERMINATE(stdout); // Write malloc information
|
||||
|
||||
#ifdef HAVE_MALLINFO
|
||||
struct mallinfo info= mallinfo();
|
||||
printf("\nMemory status:\n\
|
||||
Non-mmapped space allocated from system: %d\n\
|
||||
Number of free chunks: %d\n\
|
||||
Number of fastbin blocks: %d\n\
|
||||
Number of mmapped regions: %d\n\
|
||||
Space in mmapped regions: %d\n\
|
||||
Maximum total allocated space: %d\n\
|
||||
Space available in freed fastbin blocks: %d\n\
|
||||
Total allocated space: %d\n\
|
||||
Total free space: %d\n\
|
||||
Top-most, releasable space: %d\n",
|
||||
(int) info.arena,
|
||||
(int) info.ordblks,
|
||||
(int) info.smblks,
|
||||
(int) info.hblks,
|
||||
(int) info.hblkhd,
|
||||
(int) info.usmblks,
|
||||
(int) info.fsmblks,
|
||||
(int) info.uordblks,
|
||||
(int) info.fordblks,
|
||||
(int) info.keepcost);
|
||||
#endif
|
||||
puts("");
|
||||
if (thd)
|
||||
thd->proc_info=0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user