Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New game: Earthraid
#30
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!).

I dont see memavail or maxavail in the library directory in program files/boriel tm/zx basic compiler/library or in the wiki
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)