Changing ESP32/8266 memory layout

Hi.

I recently transplanted two of my ESPs’ memory chips for 8Mbytes ones. The surgery was a sheer success and I must say I’m glad it was.
But now I’d like to show a huge app in one of these, and to do so I think I have to alter the ESP’s memory layout.
From what I understood so far, memory layout is a parameter of esptool.py, but from the PlatformIO point of view I found nothing helpful explaining how these are created and most importantly how to create a new one.

So here I am, with this simple question: is there any platformio specific documentation explaining memory layouts for ESPs?

Thanks a lot.