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());