Re: [cc65] Bug -- Lost Heap Space

From: Oliver Schmidt <ol.sc1web.de>
Date: 2010-09-29 15:14:11
Hi Greg,

> Most of the linker configuration files now put the stack outside of the
> RAM memory area.

All but the ones for the supervision as far as I see.

> But, some of the start-up files (for the atmos, c128,
> c64, geos, lynx, and vic20 targets) still assume that the stack is
> inside that area.  Therefore, __STACKSIZE__ is subtracted twice!

Thanks for pointing out. I changed the linker configs without taking
care of this :-(

I presume that we all agree, that the idea of having the stack outside
the RAM area is in general a good one. After all the memory areas are
ment to be filled by the linker with segments. And there's no point in
having the linker fill the available memory up to the last byte only
to have the stuff later overwritten by the stack. BTW: Now all linker
configurations declare __STACKSIZE__ as weak so one can reduce the
stack size on the linker command line.

As a result the fix is to change the start-up files. I'm willing to
make these changes to my best knowledge. Unless someone want's to do
it his own for "his" file - please let me know in that case.

Regards,
Oliver

P.S.: Just recently I notied again that 'RAM' is maybe not such a
great term as it is often interpreted by cc65 newbies as 'RAM
available in the machine' and not as 'RAM to be used by the linker'.
Maybe a term like 'MAIN' would not provoke these misunderstandings...
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Sep 29 15:14:19 2010

This archive was generated by hypermail 2.1.8 : 2010-09-29 15:14:22 CEST