From b6abc42a87e127b619c141168e2440737c90d550 Mon Sep 17 00:00:00 2001
From: cgeek <cem.moreau@gmail.com>
Date: Mon, 15 May 2017 15:42:51 +0200
Subject: [PATCH] [enh] #978 Limit memory size to 300MB

---
 duniter.sh       | 2 +-
 gui/package.json | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/duniter.sh b/duniter.sh
index 4e71d991c..4792616cd 100755
--- a/duniter.sh
+++ b/duniter.sh
@@ -40,7 +40,7 @@ duniter() {
 	else
 
 	  # Calls duniter JS command
-	  $NODE "$DUNITER_DIR/bin/duniter" "$@"
+	  $NODE --max_old_space_size=300 "$DUNITER_DIR/bin/duniter" "$@"
 
 	fi;
 }
diff --git a/gui/package.json b/gui/package.json
index a01122da7..a5d7773dc 100644
--- a/gui/package.json
+++ b/gui/package.json
@@ -1,6 +1,7 @@
 {
   "name": "v1.2.3",
   "main": "index.html",
+  "js-flags": "--max_old_space_size=300",
   "node-main": "../sources/bin/duniter",
   "window": {
     "icon": "duniter.png",
-- 
GitLab