Changeset: bd0efd847b48 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bd0efd847b48
Modified Files:
        sql/storage/bat/bat_utils.c
        sql/storage/bat/bat_utils.h
Branch: Jul2012
Log Message:

cleanup unused function (leaks)


diffs (60 lines):

diff --git a/sql/storage/bat/bat_utils.c b/sql/storage/bat/bat_utils.c
--- a/sql/storage/bat/bat_utils.c
+++ b/sql/storage/bat/bat_utils.c
@@ -21,44 +21,6 @@
 #include "bat_utils.h"
 
 void
-leaks(void)
-{
-       int pbat = 0;
-       int pdisk = 0;
-       int pheat = 0;
-       bat i;
-       int tmp = 0, per = 0;
-       BAT *b;
-
-       b = BATnew(TYPE_str, TYPE_int, 32);
-       if (b == 0)
-               return ;
-
-       for (i = 1; i < BBPsize; i++) {
-               if (i != b->batCacheid && BBPvalid(i) && !(BBP_status(i) & 
BBPUNSTABLE)) {
-                       pbat++;
-                       if (BBP_cache(i)) {
-                               pheat += BBP_lastused(i);
-                               if (BBP_cache(i)->batPersistence == PERSISTENT)
-                                       per++;
-                               else
-                                       tmp++;
-                       } else {
-                               pdisk++;
-                       }
-               }
-       }
-       b = BUNins(b, "bats", &pbat, FALSE);
-       b = BUNins(b, "tmpbats", &tmp, FALSE);
-       b = BUNins(b, "perbats", &per, FALSE);
-       b = BUNins(b, "ondisk", &pdisk, FALSE);
-       b = BUNins(b, "todisk", &BBPout, FALSE);
-       b = BUNins(b, "fromdisk", &BBPin, FALSE);
-       BATprint(b);
-       bat_destroy(b);
-}
-
-void
 bat_destroy(BAT *b)
 {
        if (b)
diff --git a/sql/storage/bat/bat_utils.h b/sql/storage/bat/bat_utils.h
--- a/sql/storage/bat/bat_utils.h
+++ b/sql/storage/bat/bat_utils.h
@@ -40,8 +40,6 @@ extern void update_table_bat(BAT *b, BAT
 extern BUN append_inserted(BAT *b, BAT *i );
 extern BUN copy_inserted(BAT *b, BAT *i );
 
-extern void leaks(void);
-
 extern BAT *ebats[MAXATOMS];
 extern BAT *eubats[MAXATOMS];
 
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to