| Author |
Message |
mikep
Joined: 24 Sep 2005
Location: Austin, TX
|
|
Posted: 15 July 2008, 22:41 PM Post subject: Link error on taskHeadroom() |
|
|
| 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
Location: Portland, OR
|
|
Posted: 16 July 2008, 2:40 AM Post subject: Re: Link error on taskHeadroom() |
|
|
| 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
Location: Austin, TX
|
|
Posted: 16 July 2008, 4:58 AM Post subject: |
|
|
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.
| Task | ZVM Stack | Native Stack | Growth
| | Main | 103 | 281 | 286%
| | Task1 | 32 | 63 | 197%
| | Task2 | 32 | 71 | 222%
| | Task3 | 72 | 100 | 139%
| | Task4 | 60 | 115 | 192%
| | Task5 | 36 | 85 | 236%
|
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 |
|
 |
|