Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Clarification about HEAP
#1
I tried for months to make a compiled intro menu for my Arcade Game Designer projects without success... even storing the compiled menu program in a free memory area (below the AGD code), the game always crashed.

Finally I realized the importance of the HEAP setting in ZXB !
Reading various posts in this excellent forum, Boriel explained that the HEAP setting is a reserved memory area for string variables (please correct me if I'm wrong), and the memory allocation for this parameter is 4768 bytes by default !
So the light turned on and it seems I've finally discovered the cause of the memory collisions...

Since my Basic menu is very simple, including just a couple of UBYTEs without handling any string variable, I tried to set the HEAP to a minimum value like this:
Code:
zxb menu.bas --org=25000 --heap=128
...the magic is done... no crashes and a perfect compiled intro menu for my AGD game!

Now... I just wonder what could be the minimum HEAP setting when there's no string variables at all... and the reason why such an important parameter is just quoted in the ZXB command-line page without any further information !?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)