Assuming that Troflip's easy alt debugging is installed, pressing alt-m shows you two print statements, the first is the free heap chunk sizes and the other, a summary of memory values. To my understanding, the first print message displays the size of the available chunks of heap space in hexadecimal format. So is the whole value the size, or is it the value preceding the @ symbol

For instance here is what I am currently looking at when I hit alt-m:

a@892a

dcc@8f08

31e@a92a

902@dfde

So converting that whole segment:

690474

231509768

52341034

151183326

or just the value preceding the @:

10

3532

798

2306

Which by the way, the next print statement tells me the Free Heap is 3530 Bytes, which I guess answers my question right there. The free heap statement, isn't telling me the total free heap but instead the largest chunk of free heap, which corresponds with just the values preceding the @ symbol in the first message as representing the hexadecimal value of the space available. I am assuming that the value that follows the @ symbol tells me where in the stack the free heap chunk lies, if I am saying that right. Anyone know how to get from the value to actually finding the issues?

So in conclusion what I am looking at is some fragmented heap memory since, their should really only be one large chunk at the end and some smaller ones up front. My largest is pretty much up front. Crap!

The next couple of rooms look slightly better since the largest chunk at least falls at the end, but there is still a big one up front.

Room2: 10 3704 798 5644

Room3: 10 3260 798 6020

Room4: "Out of heap space"

*Edit

Now the problem is definitely resulting from whatever is going on in my title screen changeState. When I comment it out and run the game, checking again.

Room1: 10 4 26 6606

Room2: 10 20 10124

Room3: 10 8 10020

Room4: 10 4 4472

I am unloading all of the views and the actual room script number, Not sure why it is getting stuck in the heap stack.