DUE SRAM access and maximum limit of size.

The SRAMs are aliased within their blocks; SRAM0 is aliased and will repeat every 64K, i.e. bits 16-18 of the address are ignored. So the byte that is accessed at address 0x20000000 can also be found at 0x20010000, 0x20020000, 0x20030000, etc., up to 0x20070000.

SRAM1 is similarly aliased and will repeat every 32K, i.e. bits 15-18 of the address are ignored. So the byte that is accessed at address 0x20080000 can also be found at 0x20088000, 0x20090000, 0x20098000, etc, up to 0x200F8000.

To make the SRAM appear as one contiguous block it is accessed via the upper alias of SRAM0 (0x20070000) and the lower alias of SRAM1 (0x20080000).

AFAIK the stack is stored at the top of Sram1, and maybe your libraries are using some more RAM.

Note that the NAND Flash Controller (NFC) embeds 4224 bytes of internal SRAM. If the NFC is not used, these 4224 bytes can be used as general-purpose SRAM. You will have to power on SMC_SDRAMC (NFC) before using these 4224 bytes of memory.

Anyway, Inside the minimal sketch below, you can access 94520 bytes of SRAM thru 2 arrays:

#define Array2_size  (630)

uint32_t Array1[23000];
uint32_t Array2[Array2_size];
void setup() {
  Serial.begin(250000);
  // put your setup code for core 0 here, to run once:
  for (int i = 0; i < 23000; i++) {
    Array1[i] = i;
  }
  for (int i = 0; i < Array2_size; i++) {
    Array2[i] = i + 23000;
  }
  Serial.println(Array1[0]);
  Serial.println(Array1[22999]);
  Serial.println(Array2[0]);
  Serial.println(Array2[Array2_size - 1]);

}

void loop() {
  
}