iOS Memory Usage vs Android, Unity/Mono usage

So I couldn’t for the life of me figure out why the iOS inspector was going above 300MB when looking at memory usage for iPhone. I went into the Unity profiler and saw that while running profiler on the Mac (didnt buy pro to profile on iOS directly yet):

Used Total: 394MB Unity: 332MB Mono: 36MB, etc
Reserved Total: 416MB Unity: 318MB Mono 69MB, etc

I jumped back on my Windows machine to look at its profiler memory usage while playing the Android build in editor and it had:

Used Total: 172MB Unity: 136MB Mono: 14MB, etc
Reserved Total: 337MB Unity: 297MB Mono: 17MB, etc

Why would they be so much different?? It’s just a Windows/vs Mac run, with Android/vs iOS build…

Thanks for any help!

Wait wait so your running these from the editor on windows or mac?

As far as I understand, that is in no way representative of the actual usage of memory once on device.

Sorry for the late reply, just had a baby!

I have Android Pro so the stats from the the Windows/Android are from actually running on my phone profiling. However, it basically matches what I see in Windows editor.

However, I don’t have iOS pro, so I can only profile from the editor on the Mac. I have to look at the memory usage from the iOS sdk memory inspector gadgets thingys to watch memory on it, and it goes above 300MB, which pretty much matches what I see in the editor on the mac. Does that make sense?

I just don’t know why there is such a large memory difference between platforms. Even just going from Windows (android) to Mac (iOS) editor profilers, there is a HUGE difference. All I did was use the same unity project directory between the two…

If someone can’t help me with this, I’ll never be able to publish to iOS even though Android is great. Please help!

Congrats!

Are your texture settings different between the two platforms? Make sure they’re PVRTC compressed. Also, check your quality settings. I’m not sure if they half-size or quarter-size texture settings in there actually affect runtime memory usage, but I would assume they do.

It shouldn’t affect memory since Quality settings can be adjusted run-time. Decreasing texture size by quality is achieved by changing the texture’s mip-level, boosting draw performance by making the texture lookup faster. I don’t believe it does anything to optimize memory allocation since it doesn’t load assets upon adjustment of the quality.

My game also suffers from high memory usage if someone knows of a good tutorial on what affects memory usage I would be very interested.

I’m installing Unity 4.3 on my Windows and Mac… I’ll try to figure some more stuff out and also post a more detailed explanation of what is going on if I can’t resolve it.

I’ll also try building to iOS from Windows, then compile on the Mac and see if that helps.

http://answers.unity3d.com/questions/318244/huge-difference-in-memory-size-from-android-to-iph.html

Seems similar to what I was experiencing to a degree.

On my Android build right now, I am profiling it running on my Atrix, it says:

Used Total: 119MB Unity 74MB Mono 4MB GfxDriver 27MB etc
Reserved Total: 139MB Unity 88MB Mono 4MB etc

Now, this is what I would expect to be on iOS build as well, correct? Then why in the world would iOS inspector show memory usage going over 300MB!!?

Even if all of my textures were uncompressed it shouldn’t go that high, texture’s aren’t that big of a part of my game I don’t think.

Please, anyone who has built for Android AND iOS, are there drastic memory usage changes for the same project that you see?

Thanks!