summaryrefslogtreecommitdiffstats
path: root/src/os_amiga.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-07-02 23:22:43 +0200
committerBram Moolenaar <Bram@vim.org>2019-07-02 23:22:43 +0200
commit9ee3d161f715de9e68ba60c17e3893107bb7c42a (patch)
tree77b3793a04b9d37a6e37b89afdbca83a8646b3ad /src/os_amiga.c
parentd529ba58dc7566833546e4beb5c4c50d8b78816a (diff)
patch 8.1.1618: Amiga-like systems quickly run out of stackv8.1.1618
Problem: Amiga-like systems quickly run out of stack. Solution: Reserve a Megabyte stack. (Ola Söder, closes #4608)
Diffstat (limited to 'src/os_amiga.c')
-rw-r--r--src/os_amiga.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/os_amiga.c b/src/os_amiga.c
index 6b8eddb552..94355b81c7 100644
--- 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