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
Link error on taskHeadroom()

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



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

Posted: 15 July 2008, 22:41 PM    Post subject: Link error on taskHeadroom() Reply with quote

I cannot use System.TaskHeadRoom() in my code. The linker fails to find taskHeadroom in zxLib 2.5.2
Back to top
dkinzer
Site Admin


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

Posted: 16 July 2008, 2:40 AM    Post subject: Re: Link error on taskHeadroom() Reply with quote

mikep wrote:
I cannot use System.TaskHeadRoom() in my code. The linker fails to find taskHeadroom in zxLib 2.5.2
The entry point was missing from the library. You can try the experimental (i.e. not fully tested) ZX Library v2.5.5. The .zip file contains an updated change history.
Back to top
mikep



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

Posted: 16 July 2008, 4:58 AM    Post subject: Reply with quote

I have tested the new ZX library code and it works fine on a ZX24n. Here is some empirical data about the relative size of task stacks. These numbers have no margin at all.

TaskZVM StackNative StackGrowth
Main103281286%
Task13263197%
Task23271222%
Task372100139%
Task460115192%
Task53685236%

It is usual to have a ZVM stack margin of 10 bytes. I would suggest for a native mode device that this translates into a 30 byte margin. Here is some sample output from a ported native mode application using System.TaskHeadRoom()
Code:
Main       44
Indicators 30
Receive    30
Send       30
Update     30
Watchdog   44

Note that if you over allocate RAM, a task may still start ok but the stack headroom may get returned as &hFFFF.
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