Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New game: Earthraid
#29
boriel Wrote:
LCD Wrote:
britlion Wrote:I was running it in 48K mode. Perhaps that's it.
Just tested something: I used a heap of 100 bytes. After reducing it to 80 bytes, it crashed after generating map (I do not use any strings, just texts). So rising heap to 256 bytes will maybe fix this problem. Currently I make some optimisations for release 1.1, so there will be a new version soon.
Compilig with --debug-memory the program will complain about out of memory immediately. Sometimes, the fact the program "runs" does not actually mean it's all ok. A malloc can silently fail, and the program seems to be ok.

Also memavail() and maxavail() functions are already available in the library/ directory. So you can maybe use all of this to check for minimum heapsize. 256 is really small already! (Heap also needs about 20 bytes for itself!).

Tried it with --debug-memory
If heapsize was 80, I got "Out of memory", with heapsize 85 all was Okay. It was working in 48K mode too. I'm puzzled a bit.
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 5 Guest(s)