 |
Saturday, August 24, 2002 |
 |
|
Above and Below A5
If you read the map files the CodeWarrior linker produces, there are lines that indicate how much data is above A5, and how much data is below A5. What does this mean, and why is the above/below distinction there?
The Palm OS global data space is a chunk of memory, up to 64K large, with the A5 register pointing into the middle of it. The 64K limit comes from the 68K instruction set; you can only reference memory plus or minus 32K from a register with a single instruction.
Palm OS itself stores a pointer to an application structure in this global data space, and in order to be application data independent, it always stores this structure at A5+0. This means that no other data can overlap this structure, and it causes the global data area to be bisected. This effectivly limits the size of any data item to 32K, since if it was larger it would have to overlap the Palm OS system structure.
To find the total size of your data area, just add the above and below numbers together. This is the size of the chunk that will be allocated out of the global heap by the system when your application starts.
Weblog Disclaimer
After reading Ray Ozzie's weblog comments about employee policies for weblogs and other websites, I've altered the layout for this site slightly. Now, at the bottom of every page is a small disclaimer stating that the opinions on this site are my own, and don't necessarily reflect those of Metrowerks. I hope this had been clear before; I'm just one part of a 500-odd person company owned by a much larger company.
|
|
| August 2002 |
| Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
| |
1 |
2 |
3 |
| 4 |
5 |
6 |
7 |
8 |
9 |
10 |
| 11 |
12 |
13 |
14 |
15 |
16 |
17 |
| 18 |
19 |
20 |
21 |
22 |
23 |
24 |
| 25 |
26 |
27 |
28 |
29 |
30 |
31 |
|