Commit e3116671 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

addresses #1377

use dlmalloc in handlerton

git-svn-id: file:///svn/mysql/tokudb-engine/src@9100 c7de825b-a66e-492c-adef-691d508d4ae1
parent 2f1ec58f
......@@ -28,7 +28,7 @@ endif
MYSQL_FLAGS += -DMYSQL_DYNAMIC_PLUGIN
MYSQL_CXXFLAGS = -fno-implicit-templates -fno-exceptions -fno-rtti
CPPFLAGS = -I. -I$(MYSQL_SRC)/sql -I$(MYSQL_SRC)/include -I$(MYSQL_SRC)/regex -I$(TOKUDB)/include -I$(TOKUDB)/toku_include
CPPFLAGS = -I. -I$(MYSQL_SRC)/sql -I$(MYSQL_SRC)/include -I$(MYSQL_SRC)/regex -I$(TOKUDB)/include -I$(TOKUDB)/toku_include -I$(TOKUDB)/src
ifeq ($(SYSTEM),linux)
CPPFLAGS += -I$(TOKUDB)/linux
endif
......
......@@ -9,6 +9,7 @@ extern "C" {
#if defined(_WIN32)
#include "misc.h"
#endif
#include "dlmalloc.h"
}
#if !defined(HA_END_SPACE_KEY) || HA_END_SPACE_KEY != 0
......@@ -1770,7 +1771,7 @@ int ha_tokudb::get_status() {
}
else if (error == 0 && value.size == sizeof(share->version)) {
share->version = *(uint *)value.data;
free(value.data);
dlfree(value.data);
value.data = NULL;
}
else {
......@@ -1792,7 +1793,7 @@ int ha_tokudb::get_status() {
}
else if (error == 0 && value.size == sizeof(share->version)) {
share->capabilities= *(uint *)value.data;
free(value.data);
dlfree(value.data);
value.data = NULL;
}
else {
......@@ -3425,7 +3426,7 @@ int ha_tokudb::reset(void) {
if (current_row.flags & (DB_DBT_MALLOC | DB_DBT_REALLOC)) {
current_row.flags = 0;
if (current_row.data) {
free(current_row.data);
dlfree(current_row.data);
current_row.data = 0;
}
}
......
......@@ -7,6 +7,7 @@ extern "C" {
#include "misc.h"
#endif
#include "toku_os.h"
#include "dlmalloc.h"
}
......@@ -111,17 +112,16 @@ static const int tokudb_hton_name_length = sizeof(tokudb_hton_name) - 1;
#endif
struct st_mysql_storage_engine storage_engine_structure = { MYSQL_HANDLERTON_INTERFACE_VERSION };
#if defined(_WIN32)
extern "C" {
#include "ydb.h"
}
#endif
static int tokudb_init_func(void *p) {
TOKUDB_DBUG_ENTER("tokudb_init_func");
#if defined(_WIN32)
toku_ydb_init();
#endif
setup_dlmalloc();
tokudb_hton = (handlerton *) p;
......@@ -448,9 +448,9 @@ static bool tokudb_show_logs(THD * thd, stat_print_fn * stat_print) {
}
err:
if (all_logs)
free(all_logs);
dlfree(all_logs);
if (free_logs)
free(free_logs);
dlfree(free_logs);
free_root(&show_logs_root, MYF(0));
*root_ptr = old_mem_root;
TOKUDB_DBUG_RETURN(error);
......@@ -494,7 +494,7 @@ void tokudb_cleanup_log_files(void) {
#endif
}
free(names);
dlfree(names);
}
DBUG_VOID_RETURN;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment