I have a silly question again >o< Don't get mad at me!
For my "game" I prepared an OrderingTable for some elements by declaring globaly:
Code: Select all
#define OT_LENGTH 10
GsOT Wot[2];
GsOT_TAG zsorttable[2][1 << OT_LENGTH];
int activeBuffer;
Code: Select all
// set OT resolution
Wot[0].length = OT_LENGTH;
Wot[1].length = OT_LENGTH;
//set OT on OT handler(0)
Wot[0].org = zsorttable[0];
Wot[1].org = zsorttable[1];
Code: Select all
extern u_char* const __heapbase;
extern unsigned long __heapsize;
inline void setupHeap()
{
InitHeap3((unsigned long*)__heapbase, __heapsize);
}
I played around with this a bit! Using the old calloc for allocation will make the code work. I figured out that calloc3 allocates like at the end of the heap, while calloc allocates at the start of the heap. So I guess it has to do something with really high addresses? But since the GsOT and GsOT_Tag are both allocated via calloc3, they wouldn't have big offsets...
I feel like I do something fundamentaly wrong :/ Sorry again >o<