You seem to be using a lot of RAM. And going up to 4GB between screens
does seem to imply a leak.
You are responsible for freeing all your data when you use it. For
your program, SDL_Textures, SDL_Surfaces, and your audio data (see
ALmixer_FreeData) make up the largest use of RAM for your program. You
need to make sure you free all these resources when you are done with
Also, I don’t know enough about how your program works, but I did
notice you have a ton of resources. If you are trying to load them all
at launch, this might be too much data. On a desktop you might be able
to get away with 2GB, but on mobile, you are not going to have enough
RAM. You may need to consider loading just the assets you need when
you need them and then unloading them immediately when you are done
(if you aren’t already doing this).