Memory allocations in the Editor / Development Build / Release Build - how to know which ones and when?

The question raised during my attempt to make totally memory allocations-free game ( iOS/Android ) during the gameplay. The example will be the pixel perfect camera. In the editor it allocs every frame ~360 B for onGUI(). And then I learned that it happens only in the Editor. I checked the build and it still allocated same amount of bytes every frame. And then I finally found information that this will happen for the Development Build and not for the Release Build. So, as far as I know there is not any way to profile the Release Build so we have to take it for granted. Maybe I’m missing something here…

My questions are:

  1. Is there a way to recognize what will surely not be allocated in the Release Build?
  2. Or is there a way to profile a Release Build (iOS and Android)?

On Android, you could simply run GDB on the remote process on the device (not sure if anything other than ADB+GDB is needed if you control the uploaded app). On iOS you could insert some code to get task memory at intervals and logging into the built app. It might be slightly more involved to get that to mesh well with a Unity build.