From f40adb055204048f98ade139882c199c2bc082db Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Wed, 8 Aug 2012 20:09:37 -0400 Subject: [PATCH] Setting process limit to no more than necessary. --- 001/bin/life | 7 ++++++- 003/bin/life | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/001/bin/life b/001/bin/life index 52be6f3..993ca12 100755 --- a/001/bin/life +++ b/001/bin/life @@ -4,9 +4,14 @@ Y=`expr \`stty size | awk '{print $1}'\` - 3` X=`stty size | awk '{print $2}'` +NUM_BEAM_PROCESSES=31 +NUM_LIFE_CELLS=`expr $X \* $Y` +NUM_LIFE_PROCESSES=`expr $NUM_LIFE_CELLS + 4` +NUM_PROCESSES=`expr $NUM_BEAM_PROCESSES + $NUM_LIFE_PROCESSES` + erl \ - +P 100000000 \ + +P $NUM_PROCESSES \ -name life_001@localhost \ -noshell \ -pa ebin \ diff --git a/003/bin/life b/003/bin/life index 27371bd..fb2b7f0 100755 --- a/003/bin/life +++ b/003/bin/life @@ -6,7 +6,6 @@ X=`stty size | awk '{print $2}'` erl \ - -name life_003@localhost \ -noshell \ -pa ebin \ -s life bang $X $Y -- 2.20.1