Upgrade FRAM size to support more waypoints - How to adjust layout in firmware?

Hi all,
I recently successfully upgraded my Pixhawk CubeBlack flight controller (FC) from its original 128kbit (16k x 8) FRAM to the 256kbit (32k x 8) FRAM chip used in the Pixhawk CubeOrange and recompiled the Copter 4.x.x firmware with the HAL_STORAGE_SIZE parameter changed accordingly. This upgrade allows me to store 1305 mission entries instead of originally 649 mission entries.
The FRAM chip is also available in larger storage sizes, such as 512kbit (64k x 8) and 1Mbit (128k x 8). So I was wondering, if it is possible to also support this larger FRAM chips? If yes, how to properly adjust STORAGE_NUM_AREAS and layout[STORAGE_NUM_AREAS] in StorageManager.h and StorageManager.cpp, respectively?
Up to now I was not able to find a detailed explanation of how the memory is laid out and where the numbers in the *.cpp file come from. Maybe someone can provide a link here?
Many thanks in advance