Re: [cc65] Platform specific docs

Date view Thread view Subject view

From: Shawn Jefferson (shawnjefferson_at_24fightingchickens.com)
Date: 2003-10-28 17:39:06


On Tue, 28 Oct 2003 10:39:28 +0100, you wrote:

>
>On Mon, Oct 27, 2003 at 01:35:20PM -0800, Shawn Jefferson wrote:
>> This might be slightly off topic, but I noticed that in _heap.s we are
>> subtracting the size of the stack.  Since the stack is by default on
>> the Atari platform put at MEMTOP, if I move my BSS segment, is not
>> _heap.s wasting some memory that otherwise could be used?  The heap
>> grows downward toward the program, right?
>
>On the Atari, the stack is initialized to MEMTOP. Later, module constructors
>may decrease this value if additional space is needed for other purposes.
>Last, the heap module subtracts the proposed size of the heap (as specified in
>the linker config) from the stack pointer and uses this value as the upper
>limit for the heap (the stack pointer itself is not changed by the heap
>routines). So, as far as I can tell, nothing is wasted if you move your BSS
>segment.

Ok, so if I understand this correctly, if I move my BSS segment then
malloc'ed memory won't be located in the BSS segment, it will be
sitting at the end of memory just below my C stack regardless of how I
have my config file setup?

--
Shawn Jefferson
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-10-28 17:43:08 CET