Pass debugging flags to malloc.
authorKim Nguyễn <kn@lri.fr>
Thu, 1 Mar 2012 13:26:24 +0000 (14:26 +0100)
committerKim Nguyễn <kn@lri.fr>
Thu, 1 Mar 2012 13:26:24 +0000 (14:26 +0100)
src/common_stub.cpp
src/common_stub.hpp

index dde97fa..12b354e 100644 (file)
@@ -6,6 +6,8 @@
 extern "C" {
 #include <sys/time.h>
 #include <sys/resource.h>
+#include <malloc.h>
+
 }
 
 using std::string;
@@ -81,6 +83,7 @@ extern "C" value sxsi_cpp_init(value unit)
     rlim.rlim_cur = RLIM_INFINITY;
     setrlimit(RLIMIT_STACK, &rlim);
   };
+  //  mallopt(M_MMAP_THRESHOLD, 0);
 
   return Val_unit;
 }
index 438b5d2..47b6dcd 100644 (file)
@@ -11,7 +11,6 @@ extern "C" {
 #include <caml/fail.h>
 #include <caml/custom.h>
 #include <caml/bigarray.h>
-
 }
 #include <typeinfo>