[newlib-cygwin/main] m68k-atari-elf: updated readme

Jeff Johnston jjohnstn@sourceware.org
Thu Dec 11 21:24:48 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=7febdb1cb1f59b1808df5cb6423ae3ccd04ac384

commit 7febdb1cb1f59b1808df5cb6423ae3ccd04ac384
Author: Mikael Hildenborg <micael@hildenborg.com>
Date:   Fri Aug 15 17:31:13 2025 +0200

    m68k-atari-elf: updated readme

Diff:
---
 libgloss/m68k/atari/README | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/libgloss/m68k/atari/README b/libgloss/m68k/atari/README
index 24d2a6ea6..20283dd44 100644
--- a/libgloss/m68k/atari/README
+++ b/libgloss/m68k/atari/README
@@ -4,19 +4,19 @@ SPDX-License-Identifier: BSD-2-Clause
 Atari 16/32 bit TOS (not MINT) target.
 Target name: m68k-atari-elf.
 
-Stack size:
-The default stack size is set at 2000 bytes.
-To change stack size, add the following line to your C/C++ code:
-unsigned int _STACK_SIZE = *WANTED_STACK_SIZE*;
-Where "*WANTED_STACK_SIZE*" is the size in bytes you want to allocate for stack space.
-Do not use odd size!
-
-Heap size:
-The default heap size is to use all available memory.
-If you want to leave memory for other programs to use, then add the following line to your C/C++ code:
-unsigned int _HEAP_SIZE = *WANTED_HEAP_SIZE*;
-Where "*WANTED_HEAP_SIZE*" is the size in bytes you want to allocate for heap space.
-Do not use odd size!
+Stack and heap size:
+The symbol: "_stksize" defines how much memory that is reserved for stack and heap using the following scheme:
+1. If "_stksize" is undefined, then all available memory is reserved.
+2. If `int _stksize = SIZE;` is defined anywhere in the code, then "SIZE" is used in this way:
+   * SIZE == 0: then MINKEEP (64KB) memory is reserved.
+   * SIZE == 1: then 1/4 of all memory is reserved.
+   * SIZE == 2: then 2/4 of all memory is reserved.
+   * SIZE == 3: then 3/4 of all memory is reserved.
+   * SIZE >= 4: then SIZE memory is reserved.
+   * SIZE == -1, then all available memory is reserved (for mintlib compatibillity).
+   * SIZE < -1, then -SIZE memory is reserved (for mintlib compatibillity).
+The heap starts at the bottom of the shared memory and the stack starts at the top, and they grow towards eachother.
+A safety check for memory allocations is done to make sure that memory is not allocated and overwriting the stack.
 
 Program base page:
 A pointer to the program base page is stored at: _BasePage


More information about the Newlib-cvs mailing list