summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crypto-search.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/crypto-search.cpp b/crypto-search.cpp
index bd6cf4c..164c001 100644
--- a/crypto-search.cpp
+++ b/crypto-search.cpp
@@ -47,7 +47,8 @@ int startup(void) throw (GeneralException) {
str = argv[2];
size = h->GetSize();
-
+
+#if 0
printm(M_STATUS, "Requesting memory (%i bytes)\n", size);
if (!(buffer = (char *) malloc(size))) {
@@ -55,10 +56,14 @@ int startup(void) throw (GeneralException) {
delete h;
exit(-1);
}
-
+
printm(M_STATUS, "Loading file...\n");
h->read(buffer, size);
-
+#else
+ printm(M_STATUS, "Mapping file\n");
+
+ buffer = (char *) h->mmap();
+#endif
printm(M_STATUS, "Done, initialising the search.\n");
len = strlen(argv[2]);