today I attached the memory profiler to my physical S7 edge and after 5 minutes I had an average memory usage of 62 MB. The Google pre-launch reports on the other hand show me usage between 100 and 300 MB. Does anyone know where this huge difference comes from?
I’m guessing you used the Memory Profiler Module? You might also want to check out the Memory Profiler package. There are some difference in what Unity’s memory Manager tracks and what the OS sees as memory usage. We’re trying to close that gap.
- Unity allocated buffers that might not be fully filed with memory. Use the Used vs Allocated row in the Memory Profiler Module or look at the Memory Map of the package to get a better understanding of this. The OS may or may not see unused put allocated buffer space as used, since it might have mapped the memory but not committed the pages.
- We’re currently (unity 2019.3 package version 0.1.0-preview.9) missing some memory Allocated by the Mono/IL2CPP VM, notably codegen for generics. We’re on it. Also note that you can see the VM memory that we do track already in the memory map. The amount of memory Allocated for generics in IL2CPP can be quite significant.
- Native Plug-ins allocate without going through Unity’s Memory Manager.
I’m guessing you might be facing a mixture of these.