Commit ea023507 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul Committed by Yoni Fogel

close[t:4811] {{{svn merge -c42770 ../tokudb.4811}}}. Closes #4811.

git-svn-id: file:///svn/toku/tokudb@42772 c7de825b-a66e-492c-adef-691d508d4ae1
parent 7a95b9eb
...@@ -28,7 +28,6 @@ OBJS_RAW = \ ...@@ -28,7 +28,6 @@ OBJS_RAW = \
ydb_db \ ydb_db \
ydb_txn \ ydb_txn \
errors \ errors \
dlmalloc \
loader \ loader \
indexer \ indexer \
indexer-undo-do \ indexer-undo-do \
......
...@@ -53,11 +53,6 @@ ...@@ -53,11 +53,6 @@
toku_strdup; toku_strdup;
toku_pthread_yield; toku_pthread_yield;
dlmalloc;
dlrealloc;
dlfree;
setup_dlmalloc;
toku_cachetable_print_hash_histogram; toku_cachetable_print_hash_histogram;
toku_set_lsn_increment; toku_set_lsn_increment;
......
...@@ -4,13 +4,10 @@ ...@@ -4,13 +4,10 @@
#define DONT_DEPRECATE_MALLOC #define DONT_DEPRECATE_MALLOC
#include "test.h" #include "test.h"
/* Test to see if setting malloc works, and if dlmalloc works. */ /* Test to see if setting malloc works. */
#include <memory.h> #include <memory.h>
#include <db.h> #include <db.h>
#ifdef USE_TDB
#include <dlmalloc.h>
#endif
static int malloc_counter=0; static int malloc_counter=0;
static int realloc_counter=0; static int realloc_counter=0;
...@@ -79,15 +76,6 @@ test1 (void) ...@@ -79,15 +76,6 @@ test1 (void)
toku_free(x); assert(malloc_counter==1 && free_counter==1 && realloc_counter==1); toku_free(x); assert(malloc_counter==1 && free_counter==1 && realloc_counter==1);
} }
r = db_env_set_func_malloc(dlmalloc); assert(r==0);
r = db_env_set_func_realloc(dlrealloc); assert(r==0);
r = db_env_set_func_free(dlfree); assert(r==0);
{
char *x = toku_malloc(5); assert(x);
x = toku_realloc(x, 6); assert(x);
toku_free(x);
}
r = db_env_set_func_malloc(NULL); assert(r==0); r = db_env_set_func_malloc(NULL); assert(r==0);
r = db_env_set_func_realloc(NULL); assert(r==0); r = db_env_set_func_realloc(NULL); assert(r==0);
r = db_env_set_func_free(NULL); assert(r==0); r = db_env_set_func_free(NULL); assert(r==0);
......
...@@ -27,7 +27,6 @@ const char *toku_copyright_string = "Copyright (c) 2007-2009 Tokutek Inc. All r ...@@ -27,7 +27,6 @@ const char *toku_copyright_string = "Copyright (c) 2007-2009 Tokutek Inc. All r
#include "cachetable.h" #include "cachetable.h"
#include "log.h" #include "log.h"
#include "memory.h" #include "memory.h"
#include "dlmalloc.h"
#include "checkpoint.h" #include "checkpoint.h"
#include "key.h" #include "key.h"
#include "loader.h" #include "loader.h"
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <db.h> #include <db.h>
#include "brt-internal.h" #include "brt-internal.h"
#include "brt-flusher.h" #include "brt-flusher.h"
#include "dlmalloc.h"
#include "checkpoint.h" #include "checkpoint.h"
#include "brtloader.h" #include "brtloader.h"
#include "ydb_env_func.h" #include "ydb_env_func.h"
...@@ -95,15 +94,6 @@ db_env_set_func_free (void (*f)(void*)) { ...@@ -95,15 +94,6 @@ db_env_set_func_free (void (*f)(void*)) {
return 0; return 0;
} }
// Got to call dlmalloc, or else it won't get included.
void
setup_dlmalloc (void) {
db_env_set_func_malloc(dlmalloc);
db_env_set_func_realloc(dlrealloc);
db_env_set_func_free(dlfree);
}
// For test purposes only. // For test purposes only.
// With this interface, all checkpoint users get the same callbacks and the same extras. // With this interface, all checkpoint users get the same callbacks and the same extras.
void void
......
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