Commit c936aac3 authored by Yoni Fogel's avatar Yoni Fogel

Addresses #1032, #1343

Disable dlmalloc (for windows only) till it is ported.
Fix a typo for TYDB vs TYDB_BUNDLE,


git-svn-id: file:///svn/toku/tokudb@8692 c7de825b-a66e-492c-adef-691d508d4ae1
parent 210ce9d3
...@@ -17,7 +17,7 @@ CPPFLAGS+=-D_GNU_SOURCE -D_THREAD_SAFE ...@@ -17,7 +17,7 @@ CPPFLAGS+=-D_GNU_SOURCE -D_THREAD_SAFE
YDB=ydb.$(AEXT) YDB=ydb.$(AEXT)
YDB_BUNDLE=ydb.bundle YDB_BUNDLE=ydb.bundle
TYDB=tydb.$(AEXT) TYDB=tydb.$(AEXT)
TYDB=tydb.bundle TYDB_BUNDLE=tydb.bundle
LIBNAME=libtokudb LIBNAME=libtokudb
TLIBNAME=libtokudbtrace TLIBNAME=libtokudbtrace
...@@ -30,11 +30,18 @@ OBJS_RAW = \ ...@@ -30,11 +30,18 @@ OBJS_RAW = \
ydb_lib \ ydb_lib \
ydb \ ydb \
errors \ errors \
dlmalloc \
elocks \ elocks \
# dlmalloc \ DLMALLOC not for windows yet. Add it for linux (below)
#\end #\end
#OBJS automatically defined. #OBJS automatically defined.
#dlmalloc not for windows (yet)
ifeq ($(CYGWIN),)
OBJS_RAW += dlmalloc
else ifneq ($(CC),icc)
OBJS_RAW += dlmalloc
endif
LIBRARIES= \ LIBRARIES= \
$(LIBRARY) \ $(LIBRARY) \
$(TLIBRARY) \ $(TLIBRARY) \
......
...@@ -27,7 +27,9 @@ const char *toku_copyright_string = "Copyright (c) 2007, 2008 Tokutek Inc. All ...@@ -27,7 +27,9 @@ const char *toku_copyright_string = "Copyright (c) 2007, 2008 Tokutek Inc. All
#include "cachetable.h" #include "cachetable.h"
#include "log.h" #include "log.h"
#include "memory.h" #include "memory.h"
#ifndef TOKU_WINDOWS
#include "dlmalloc.h" #include "dlmalloc.h"
#endif
#ifdef TOKUTRACE #ifdef TOKUTRACE
#define DB_ENV_CREATE_FUN db_env_create_toku10 #define DB_ENV_CREATE_FUN db_env_create_toku10
...@@ -3667,7 +3669,9 @@ int db_env_set_func_free (void (*f)(void*)) { ...@@ -3667,7 +3669,9 @@ int db_env_set_func_free (void (*f)(void*)) {
} }
// Got to call dlmalloc, or else it won't get included. // Got to call dlmalloc, or else it won't get included.
void setup_dlmalloc (void) { void setup_dlmalloc (void) {
#ifndef TOKU_WINDOWS
db_env_set_func_malloc(dlmalloc); db_env_set_func_malloc(dlmalloc);
db_env_set_func_realloc(dlrealloc); db_env_set_func_realloc(dlrealloc);
db_env_set_func_free(dlfree); db_env_set_func_free(dlfree);
#endif
} }
...@@ -10,6 +10,9 @@ void toku_ydb_init(void); ...@@ -10,6 +10,9 @@ void toku_ydb_init(void);
// Called when the ydb library is unloaded. // Called when the ydb library is unloaded.
void toku_ydb_destroy(void); void toku_ydb_destroy(void);
// Called to use dlmalloc functions.
void setup_dlmalloc(void);
// db_env_create for the trace library // db_env_create for the trace library
int db_env_create_toku10(DB_ENV **, u_int32_t) __attribute__((__visibility__("default"))); int db_env_create_toku10(DB_ENV **, u_int32_t) __attribute__((__visibility__("default")));
......
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