Setting process limit to no more than necessary.
authorSiraaj Khandkar <siraaj@khandkar.net>
Thu, 9 Aug 2012 00:09:37 +0000 (20:09 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Thu, 9 Aug 2012 00:09:37 +0000 (20:09 -0400)
001/bin/life
003/bin/life

index 52be6f3..993ca12 100755 (executable)
@@ -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 \
index 27371bd..fb2b7f0 100755 (executable)
@@ -6,7 +6,6 @@ X=`stty size | awk '{print $2}'`
 
 
 erl \
-    -name life_003@localhost \
     -noshell \
     -pa ebin \
     -s life bang $X $Y
This page took 0.031224 seconds and 4 git commands to generate.