Add Linux header
authorVictor Grishchenko <victor.grishchenko@gmail.com>
Thu, 4 Feb 2010 10:31:49 +0000 (11:31 +0100)
committerVictor Grishchenko <victor.grishchenko@gmail.com>
Thu, 4 Feb 2010 10:31:49 +0000 (11:31 +0100)
bins.cpp
bins.h
mfold/run.default.sh [new file with mode: 0644]

index ffc98c6..184e678 100644 (file)
--- a/bins.cpp
+++ b/bins.cpp
@@ -10,6 +10,7 @@
 #include <algorithm>
 #include <cstdio>
 #include <cstring>
+#include <cstdlib>
 #include <limits>
 #include <numeric>
 #include <utility>
@@ -60,6 +61,11 @@ binmap_t::binmap_t() :  height(4), blocks_allocated(0), cells(NULL),
     assert( free_top == 1 );
 }
 
+binmap_t::~binmap_t () {
+    if (cells)
+        free(cells);
+}
+
 void binmap_t::twist (uint64_t mask) {
     while ( (1<<height) <= mask )
         extend_range();
diff --git a/bins.h b/bins.h
index c4737c3..d0192ab 100644 (file)
--- a/bins.h
+++ b/bins.h
@@ -31,7 +31,7 @@ public:
     binmap_t(const binmap_t& b);
     
     /** Destructor. */
-    ~binmap_t() { if (cells) free(cells); }
+    ~binmap_t()
 
     /** Get value for the bin. */
     uint16_t    get (bin64_t bin); 
diff --git a/mfold/run.default.sh b/mfold/run.default.sh
new file mode 100644 (file)
index 0000000..85ed817
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+HASH=66b9644bb01eaad09269354df00172c8a924773b
+HEAD=node300.das2.ewi.tudelft.nl
+
+sleep 1 
+ulimit -c 1024000
+cd swift || exit 1
+rm -f chunk
+./exec/leecher $HASH chunk $HEAD:20000 0.0.0.0:10000 >lout 2>lerr || exit 2