Memory Allocation Failed: loading models
-
Hiya,
I recently learned about the memory/fps tracker, but when I'm loading models, it seems like I run out of memory long before the number comes even close to zero (and it the amount remaining changes depending on what else I load).
So, with nothing else in the program (and without placing objects), I can only load 124 of 302 of Kenney's Road Tiles, with the 125th crashing it.
With the error message up, the memory says about 1730MB; however, when the program is more complicated, like if I load and place sprites and place 1 of the models as an object, I can get down to around 1600MB on the error screen (quickly jumping from around 1670MB pre-error, and I'm still able to load around 100 models).
Also, it says "memory allocation failed" rather than "out of memory" (although, maybe it's the same thing!)
What is the condition for getting the "memory allocation failed" message? Is there a specific allotment of memory just for loading models, or is this memory error a bug?
Thanks,
JasonEdit: Here's a short version to reproduce it (it happens whether or not you store the models because they are never freed):
string land = "Kenney/roadTile_" for i=1 to 126 loop string num = str(i) while len(num)<3 loop num= "0"+num repeat loadModel(land+num) repeat
-
well, it's interesting that you bring this up, seems like something not discussed on the Arena before... I'm wondering if anyone of the FUZE knows what's going on with memory in this case, given there are no replies to the topic as of now?
-
I was messing with it a while ago and forgot to reply. It seems you can only load in 124 models in a program I’ve tried it with many different models and it’s 124 as the max every time.
-
@LinkCraft That's unfortunate. :(
At least I hadn't started making the collision zones for each tile I was going to work with.
Maybe I can downscale.
Thanks for looking into this.
Jason