diff --git a/newbrt/brtdump.c b/newbrt/brtdump.c index 74a33e09f2f..6c118376274 100644 --- a/newbrt/brtdump.c +++ b/newbrt/brtdump.c @@ -453,7 +453,6 @@ main (int argc, const char *const argv[]) { dump_node_wrapper, &info, TRUE, TRUE); } toku_brtheader_free(h); - toku_malloc_cleanup(); return 0; } diff --git a/newbrt/tdb-recover.c b/newbrt/tdb-recover.c index 454cf5cdb68..c7f3e767287 100644 --- a/newbrt/tdb-recover.c +++ b/newbrt/tdb-recover.c @@ -41,6 +41,5 @@ int recovery_main (int argc, const char *const argv[]) { fprintf(stderr, "Recovery failed\n"); return(1); } - toku_malloc_cleanup(); return 0; } diff --git a/newbrt/tests/benchmark-test.c b/newbrt/tests/benchmark-test.c index c0f0a4d3f0c..69be9d6483b 100644 --- a/newbrt/tests/benchmark-test.c +++ b/newbrt/tests/benchmark-test.c @@ -194,10 +194,7 @@ test_main (int argc, const char *argv[]) { fflush(stdout); } unlink(fname); - if (verbose>1) { - toku_malloc_report(); - } - toku_malloc_cleanup(); + return 0; } diff --git a/newbrt/tests/brt-serialize-test.c b/newbrt/tests/brt-serialize-test.c index 4fd80fb4877..2a23d00d0c5 100644 --- a/newbrt/tests/brt-serialize-test.c +++ b/newbrt/tests/brt-serialize-test.c @@ -149,6 +149,5 @@ test_main (int argc __attribute__((__unused__)), const char *argv[] __attribute_ toku_memory_check = 1; test_serialize_leaf(); test_serialize_nonleaf(); - toku_malloc_cleanup(); return 0; } diff --git a/newbrt/tests/brt-test-cursor-2.c b/newbrt/tests/brt-test-cursor-2.c index 932866fb0c2..90fb0ae3b2e 100644 --- a/newbrt/tests/brt-test-cursor-2.c +++ b/newbrt/tests/brt-test-cursor-2.c @@ -102,8 +102,6 @@ test_main (int argc , const char *argv[]) { DB a_db; DB *db = &a_db; test_brt_cursor(db); - - toku_malloc_cleanup(); if (verbose) printf("test ok\n"); return 0; } diff --git a/newbrt/tests/brt-test-cursor.c b/newbrt/tests/brt-test-cursor.c index 8f0ac7a7013..e142bb2c87c 100644 --- a/newbrt/tests/brt-test-cursor.c +++ b/newbrt/tests/brt-test-cursor.c @@ -885,40 +885,40 @@ static void test_brt_cursor(DB *db) { test_multiple_brt_cursors(3, db); for (n=0; n 0); - if (--toku_ydb_refs == 0) { - /* call global destructors */ - toku_malloc_cleanup(); - } -} - /* env methods */ static int toku_env_close(DB_ENV *env, u_int32_t flags); static int toku_env_set_data_dir(DB_ENV * env, const char *dir); @@ -935,7 +920,6 @@ static int toku_env_close(DB_ENV * env, u_int32_t flags) { env->i = NULL; toku_free(env); env = NULL; - ydb_unref(); if ((flags!=0) && !(flags==DB_CLOSE_DONT_TRIM_LOG)) r = EINVAL; return r; @@ -1829,7 +1813,6 @@ static int toku_env_create(DB_ENV ** envp, u_int32_t flags) { assert(result->i->open_dbs); } - ydb_add_ref(); *envp = result; r = 0; cleanup: @@ -2272,7 +2255,6 @@ db_close_before_brt(DB *db, u_int32_t UU(flags)) { if (db->i->dname) toku_free(db->i->dname); toku_free(db->i); toku_free(db); - ydb_unref(); if (r1) return r1; if (r2) return r2; if (is_panicked) return EINVAL; @@ -4880,7 +4862,6 @@ static int toku_db_create(DB ** db, DB_ENV * env, u_int32_t flags) { toku_free(result); return r; } - ydb_add_ref(); *db = result; return 0; } diff --git a/windows/memory.c b/windows/memory.c index c84680a61c6..1647d4e0cd1 100644 --- a/windows/memory.c +++ b/windows/memory.c @@ -113,32 +113,6 @@ toku_xstrdup (const char *s) return toku_xmemdup(s, strlen(s)+1); } -void -toku_memory_check_all_free (void) -{ -} - -int -toku_get_n_items_malloced (void) -{ - return 0; -} - -void -toku_print_malloced_items (void) -{ -} - -void -toku_malloc_report (void) -{ -} - -void -toku_malloc_cleanup (void) -{ -} - int toku_set_func_malloc(malloc_fun_t f) { t_malloc = f;