memory organisation

Discuss about beta versions of mikroC compiler.
Post Reply
Author
Message
jpc
Posts: 1986
Joined: 22 Apr 2005 17:40
Location: France 87

memory organisation

#1 Post by jpc » 25 Apr 2006 07:43

first impression is that ram-usage is great improvement , would be helpfull to know the strategy followed by the compiler : global var's seem to grow up starting 0x900 , locals are ??? ( show 0xFFFFFFFF in statistics ) I assume that is caused by the optimiser , these must be created in soem stack-space. If declared static they show up like global's. When using a local array i found it possible to compile without error something resulting in 158% used RAM , seems this stack-space is not checked properly at the moment )

mE , can you explain how everything is/should be mapped and what are the limit's of these area's .

pizon
mikroElektronika team
Posts: 823
Joined: 11 Oct 2004 08:53

Re: memory organisation

#2 Post by pizon » 25 Apr 2006 08:02

jpc wrote:first impression is that ram-usage is great improvement , would be helpfull to know the strategy followed by the compiler : global var's seem to grow up starting 0x900 , locals are ???
Locals are on the local frame, which exists on the stack during the execution of a certain function. The W14 register is used as a frame pointer (through the LNK and ULNK instructions).
If declared static they show up like global's.
All statics are declared in the (global) data space, with local scope.
When using a local array i found it possible to compile without error something resulting in 158% used RAM , seems this stack-space is not checked properly at the moment )
Yes, statistics need some furnishing :D.
mE , can you explain how everything is/should be mapped and what are the limit's of these area's .
The way it is now in the .mlk file, global variables start from 0x800, and stack goes from 0x900.
this is how it is mapped now, whether it should be mapped that way is to be discussed.
pizon

Post Reply

Return to “mikroC Beta testing”