• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

High memory usage of a ds_map

U

umetnik

Guest
I was surprised by the high memory usage of ds_map_create(). Each empty map takes about 32kB of memory. Compared to 28 bytes for ds_list_create(). That is a more than 1000 times less. Is this normal? I checked both with and without YYC, on Windows and Android.

I wanted to have a ds_list of entries with a ds_map for each entry holding a set of its different "properties". If I would use instances of an object with these properties set, it would "only" take around 1kB for each instance (32 times better), but creating instances is a slow process and would most likely affect FPS...

Maybe I should think of a way to have one ds_map, shared by all entries in the list. Or I should learn how to use buffers and use those instead. Maps did seem more convenient for my use case though. Does anyone know of a better approach?
 
Top