Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
Site SearchSite Search   LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
Peristent vars

 
Post new topic   Reply to topic    Forum Index -> ZBasic Native Mode
Author Message
pjc30943



Joined: 02 Dec 2005
Posts: 220

Posted: 16 April 2008, 22:53 PM    Post subject: Peristent vars Reply with quote

After compiling, 32 bytes of peristent memory is used--but I haven't declared any persistent variables.
Where do these bytes arise from?

EDIT: compiled for a 1280n
Back to top
mikep



Joined: 24 Sep 2005
Posts: 765
Location: Austin, TX

Posted: 16 April 2008, 23:20 PM    Post subject: Reply with quote

The first 32 bytes of persistent memory (chip EEPROM) is reserved by the VM or ZX library. It contains things like the FirstTime flag.

The 32 bytes is not reported by the VM compiler as it already is reserved by the VM. It is reported by the native mode compiler because GCC (avr-size) reports the total memory used for each memory type. Potentially I guess Don could subtract 32 from the persistent memory number so that the compiler results are the same for VM and native mode devices.
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR

Posted: 16 April 2008, 23:38 PM    Post subject: Re: Peristent vars Reply with quote

pjc30943 wrote:
Where do these bytes arise from?
Those are the 32 bytes of Persistent Memory that are reserved for system use. At one time, we were planning to report only the number of bytes of Persistent Memory used by the application. We decided not to do so because we could not report RAM and Program Memory in the same way. The reason we cannot do so for those is because the contribution to RAM and Program Memory use from non-user sources varies depending on which System Library routines are used in a particular application. Moreover, the system and user items are intermixed in the memory spaces (other than Persistent Memory).

If you add the --keep-files option to your project file, you'll find a symbol file produced by the linker that will help you see which elements are from your program; all of them will have name that begin with a prefix like zf_, zv_. All other elements are system elements.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> ZBasic Native Mode Time synchro. with the server - Timezone/DST with your computer
Page 1 of 1

 


All content Copyright © 2005-2012 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group