Commit c20f8f8a authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul Committed by Yoni Fogel
Browse files

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

git-svn-id: file:///svn/toku/tokudb@42772 c7de825b-a66e-492c-adef-691d508d4ae1
parent 19f913f8
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ OBJS_RAW = \
	ydb_db \
	ydb_txn \
	errors \
	dlmalloc \
	loader \
	indexer \
	indexer-undo-do \
+0 −5
Original line number Diff line number Diff line
@@ -53,11 +53,6 @@
   toku_strdup;
   toku_pthread_yield;

   dlmalloc;
   dlrealloc;
   dlfree;
   setup_dlmalloc;

   toku_cachetable_print_hash_histogram;
   toku_set_lsn_increment;

+1 −13
Original line number Diff line number Diff line
@@ -4,13 +4,10 @@
#define DONT_DEPRECATE_MALLOC
#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 <db.h>
#ifdef USE_TDB
#include <dlmalloc.h>
#endif

static int malloc_counter=0;
static int realloc_counter=0;
@@ -79,15 +76,6 @@ test1 (void)
	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_realloc(NULL);  assert(r==0);
    r = db_env_set_func_free(NULL);     assert(r==0);
+0 −1
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ const char *toku_copyright_string = "Copyright (c) 2007-2009 Tokutek Inc. All r
#include "cachetable.h"
#include "log.h"
#include "memory.h"
#include "dlmalloc.h"
#include "checkpoint.h"
#include "key.h"
#include "loader.h"
+0 −10
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@
#include <db.h>
#include "brt-internal.h"
#include "brt-flusher.h"
#include "dlmalloc.h"
#include "checkpoint.h"
#include "brtloader.h"
#include "ydb_env_func.h"
@@ -95,15 +94,6 @@ db_env_set_func_free (void (*f)(void*)) {
    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.
// With this interface, all checkpoint users get the same callbacks and the same extras.
void