Actually succeed in setting overcommit_memory on a real roboRIO

Change-Id: Ic740e4b5e961c6da31078c5482c541132d2c1f35
diff --git a/aos/linux_code/starter/starter.cc b/aos/linux_code/starter/starter.cc
index 855653d..9893970 100644
--- a/aos/linux_code/starter/starter.cc
+++ b/aos/linux_code/starter/starter.cc
@@ -727,6 +727,14 @@
   signal(SIGTERM, KillChildrenSignalHandler);
   signal(SIGBUS, KillChildrenSignalHandler);
   signal(SIGXCPU, KillChildrenSignalHandler);
+
+#ifdef AOS_ARCHITECTURE_arm_frc
+  // Just allow overcommit memory like usual. Various processes map memory they
+  // will never use, and the roboRIO doesn't have enough RAM to handle it.
+  // This is in here instead of starter.sh because starter.sh doesn't run with
+  // permissions on a roboRIO.
+  CHECK(system("echo 0 > /proc/sys/vm/overcommit_memory") == 0);
+#endif
   
   libevent_base = EventBaseUniquePtr(event_base_new());
 
diff --git a/aos/linux_code/starter/starter.sh b/aos/linux_code/starter/starter.sh
index 13f7fa2..b81bf62 100755
--- a/aos/linux_code/starter/starter.sh
+++ b/aos/linux_code/starter/starter.sh
@@ -3,10 +3,6 @@
 # NI already has a core pattern, so we probably shouldn't change it.
 #echo '/home/driver/tmp/robot_logs/%e-%s-%p-%t.coredump' > /proc/sys/kernel/core_pattern
 
-# Just allow overcommit memory like usual. Various processes map memory they
-# will never use, and the roboRIO doesn't have enough RAM to handle it.
-echo 0 > /proc/sys/vm/overcommit_memory
-
 while true; do
 	export PATH=$PATH:/home/admin/robot_code
 	starter_exe /home/admin/robot_code/start_list.txt