summaryrefslogtreecommitdiff
path: root/cacount.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cacount.cpp')
-rw-r--r--cacount.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/cacount.cpp b/cacount.cpp
index 012f33b..7abda2f 100644
--- a/cacount.cpp
+++ b/cacount.cpp
@@ -11,8 +11,7 @@
#include <set>
#include <thread>
-#include <sys/mman.h>
-
+#include "mmalloc.hpp"
#include "packed_array.hpp"
#include "timer.hpp"
@@ -20,7 +19,7 @@ using namespace std;
using boost::optional;
#ifndef BIT_WIDTH
-#define BIT_WIDTH 16
+#define BIT_WIDTH 30
#endif
typedef uint64_t State;
@@ -166,16 +165,6 @@ void printTraj(State s, int count) {
}
}
-template<typename T>
-T* mmalloc() {
- void *p = MAP_FAILED;
- for (auto flag : {MAP_POPULATE | MAP_HUGETLB, MAP_POPULATE, 0})
- if (p == MAP_FAILED)
- p = mmap(NULL, sizeof(Trans), PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | flag, -1, 0);
- assert(p != MAP_FAILED);
- return (T*) p;
-}
-
int main(int argc, char **argv) {
assert(argc >= 2);
rule = atoi(argv[1]);
contact: Jan Huwald // Impressum