memory allocation question

Hi,

Today I profiled my game and I see that I allocate memory every frame from 3.8kb to 4.2 kb. Is it acceptable or should I spend time on reducing this?

I see no performance problem on mobile phones when I play for long times but I tested on Samsung S6 and J7

I also attached a screenshot if you want to take a look and help.

If there is no problem, don’t bother with it.

I would suggest looking through the CPU frames to find GC.Collect. Its normally apparent as a single frame that spikes at some sort of regular interval.

The time spent to do a garbage collection is very much system dependent. If you memory structure is straightforward, it may not take the runtime long to do the collection. So you might not see it anyway.

1 Like