MemoryTest fail

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

MemoryTest fail

chrisshyi
Been getting this error message when I run MemoryTest



I suspect there's something wrong with my Memory.init() method, I basically set up 3 static Array variables, RAM, head and heap, with the following initialization:

RAM = 0
head = 2048 // head of the memory segments linked list
heap = 2048

heap[0] = -31416
heap[1] = 14334

Wondering if someone can give me some hints, thanks!
Reply | Threaded
Open this post in threaded view
|

Re: MemoryTest fail

cadet1620
Administrator
Your Init looks OK.

It looks like you are trying to "pop pointer 1" with a value of 12 on the top of the stack.

You are a long way into initialization.  The supplied Sys,init calls
  do Memory.init();
  do Math.init();        // Array.new(16), twice
  do Screen.init();     // Array.new(17)
  do Output.init();

Output.init calls
  let buffer = String.new(6);
  do Output.initMap();                   // Array.new(127) and 127 of Array.new(11) creating the font
  do Output.createShiftedMap();     // Array.new(127) and 127 of Array.new(11) creating font chars << 8

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: MemoryTest fail

chrisshyi
Thanks Mark, there must be something wrong with my alloc/deAlloc then. Would you mind taking a look at my code? I've been staring at it for the last two hours and couldn't quite figure out what's wrong.
Reply | Threaded
Open this post in threaded view
|

Re: MemoryTest fail

cadet1620
Administrator
I'll be happy to take a look at it.

Email it to me along with any other of your code you are testing with, if any.

--Mark