Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Out of Memory error
boriel Wrote:
LCD Wrote:I will check it again, and dramaticaly reduce the amount of gotos and gosubs later today. Maybe there are too many of them. After I added another gosub yesterday, I got the error already in level 2. I think, oblo is right, with gosub. Maybe a memory leak.

It shouldn't be a memory leak, but a "Stack leak". GOTO == JP; RETURN = RET. It's pretty straightforward for the compiler.
I will add a "Stack check" flag to trap this.

Maybe your ORG is too low. Try setting it to ORG=30000 :?:
Okay, but you have already debug memory option. Can you not include the stack check to it? Or it it will be a independend stack check option, with live-display of stack size displays at given position every 1 second?
e.g.: DEBUG AT 23,0;#StackUsed (compiling it in normal mode obmits it and does not calculate the system information values, but compiling in -debuger mode display all DEBUG messages like print, and calculate system informations or variables, which can be then displayed).
I think, this could be a nice feature request
#StackUsed returns the currently used size of stack
#StackMax returns maximum size of stack
#StackFree returns free memory left on stack
#HeapFree returns free memory on Heap

It is true, I put my stack very low in the memory to gain room for my games, will try today to put it higher or lower to check if it changes anything.
------------------------------------------------------------ redirector is dead
Visit my home page!

Messages In This Thread

Forum Jump:

Users browsing this thread: 1 Guest(s)