Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(502)

Unified Diff: src/main.cpp

Issue 1738683003: Subzero. Moar performance tweaks. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: fixes GPLUSPLUS=1 Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/IceBitVector.h ('K') | « src/IceTypes.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« src/IceBitVector.h ('K') | « src/IceTypes.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698