Index: src/main.cpp |
diff --git a/src/main.cpp b/src/main.cpp |
index 9e2a6ecf32d6f5f7d31c97162d457ddc2c6816fe..a755e89870e2c4c464c25b733eecd3c85bcd7ea6 100644 |
--- a/src/main.cpp |
+++ b/src/main.cpp |
@@ -17,6 +17,10 @@ |
#include "IceBuildDefs.h" |
#include "IceCompileServer.h" |
+#ifdef __pnacl__ |
+#include <malloc.h> |
+#endif // __pnacl__ |
+ |
/// Depending on whether we are building the compiler for the browser or |
/// standalone, we will end up creating a Ice::BrowserCompileServer or |
/// Ice::CLCompileServer object. Method |
@@ -26,6 +30,12 @@ |
/// We can only compile the Ice::BrowserCompileServer object with the PNaCl |
/// compiler toolchain, when building Subzero as a sandboxed translator. |
int main(int argc, char **argv) { |
+#ifdef __pnacl__ |
sehr
2016/02/26 03:27:39
Comment here that the pnacl implementation of mall
John
2016/02/26 15:15:50
Done.
|
+#define M_GRANULARITY (-2) |
+ mallopt(M_GRANULARITY, 16 * 1024 * 1024); |
+#undef M_GRANULARITY |
+#endif // __pnacl__ |
+ |
if (Ice::BuildDefs::browser()) { |
assert(argc == 1); |
return Ice::BrowserCompileServer().runAndReturnErrorCode(); |