doomhack / GBADoom

A port of prBoom to the Nintendo GBA.
214 stars 27 forks source link

Z_Malloc: Failure trying to allocate incorrect numbers? #24

Closed RetroGamer02 closed 3 years ago

RetroGamer02 commented 3 years ago

Hi again this time I think I have an actual bug not a question. While trying to simplify the FreeDoom maps I found that the numbers reported by Z_Malloc error don't always seem to make sense. Sometimes the number will stay the same despite changes or even seem to go in the wrong direction only to go back to reporting a small number. Something seems fishy to me about the way it works could you please take a good look at the code responsible?

doomhack commented 3 years ago

The error is reported in z_zone.c Lines 164-165.

It simply reports the size of the alloc that failed so as you change the map the number may go up and down depending on the specific alloc that failed.

My advice if you haven't already is ensure you are are building and testing PC builds. (Download Qt 5.15, open the .pro file in Qt Creator and you will be able to build and run on PC.) The console window shows a running count of the amount of memory allocated and updates whenever anything is allocated.

RetroGamer02 commented 3 years ago

Ill give that a try thank you!