diff src/os_amiga.c @ 17237:9185ba71aae6 v8.1.1618

patch 8.1.1618: Amiga-like systems quickly run out of stack commit https://github.com/vim/vim/commit/9ee3d161f715de9e68ba60c17e3893107bb7c42a Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jul 2 23:22:43 2019 +0200 patch 8.1.1618: Amiga-like systems quickly run out of stack Problem: Amiga-like systems quickly run out of stack. Solution: Reserve a Megabyte stack. (Ola S?der, closes https://github.com/vim/vim/issues/4608)
author Bram Moolenaar <Bram@vim.org>
date Tue, 02 Jul 2019 23:30:06 +0200
parents ce04ebdf26b8
children b25f81a18616
line wrap: on
line diff
--- a/src/os_amiga.c
+++ b/src/os_amiga.c
@@ -61,6 +61,17 @@
 #endif /* PROTO */
 
 /*
+ * Set stack size to 1 MiB on NG systems. This should be enough even for
+ * hungry syntax HL / plugin combinations. Leave the stack alone on OS 3
+ * and below, those systems might be low on memory.
+ */
+#if defined(__amigaos4__)
+static const char* __attribute__((used)) stackcookie = "$STACK: 1048576";
+#elif defined(__AROS__) || defined(__MORPHOS__)
+unsigned long __stack = 1048576;
+#endif
+
+/*
  * At this point TRUE and FALSE are defined as 1L and 0L, but we want 1 and 0.
  */
 #undef	TRUE