arrays with feather m0

Hi im using an adafruit feather m0 to read two accelerometers and put them into a 2d array,

([1000] [5] seems to be the biggest i can make (floating point)))

i want to record more data so i thought it should be possible to just make more arrays with the same dimensions, however when i do this it gives me the following error. (the program compiles no problems when ive only got one array)

error: Error compiling for board Adafruit Feather M0.

does anyone have any idea why this is happening (i assume the m0 should be able to hold more than one large array?)

many thanks

//====OPTIONS ====
int serial = 1;

//===ARRAY CONFIG===
int samples = 800;    //number of lines of samples to take
int data[800][5];
int data2[800][5];

//===Accel ===
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_ADXL343.h>
Adafruit_ADXL343 accel1 = Adafruit_ADXL343(0x1D);
Adafruit_ADXL343 accel2 = Adafruit_ADXL343(0x53);

//=== SD CARD ===
#include <SPI.h>
#include <SD.h>

const int chipSelect = 4;

String dataString = "";
String fileName =   ""; //generate a random filename each time

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, LOW);
  // put your setup code here, to run once:
  if (serial == 1) {
    Serial.begin(115200);   //start serial
  }
  Wire.begin();
  randomSeed(analogRead(0));    //generate random file name
  fileName = "Data" + String(random(5000)) + ".csv";

  if (serial == 1) {    //is serial on?
    while (!Serial)
      delay(10); // will pause Zero, Leonardo, etc until serial console opens
  }
  //===ACCEL===
  /* Initialise the sensor */
  if (!accel1.begin())
  {
    /* There was a problem detecting the ADXL343 ... check your connections */
    Serial.println("Ooops, no ADXL343 detected ... Check your wiring!");
    while (1);
  }
  /* Initialise the sensor */
  if (!accel2.begin())
  {
    /* There was a problem detecting the ADXL343 ... check your connections */
    Serial.println("Ooops, no ADXL343 detected ... Check your wiring!");
    while (1);
  }
  /* Set the range to whatever is appropriate for your project */
  accel1.setRange(ADXL343_RANGE_16_G);
  accel2.setRange(ADXL343_RANGE_16_G);
  accel1.setDataRate(ADXL343_DATARATE_3200_HZ);
  accel2.setDataRate(ADXL343_DATARATE_3200_HZ);


  //==== SD Card ====
  // see if the card is present and can be initialized:
  if (!SD.begin(chipSelect)) {
    if (serial == 1) {    //is serial on?
      Serial.println("Card failed, or not present");
    }
    // don't do anything more:
    while (1);
  }
  dataString = "Time, Accel 1 X, Accel 1 Y, Accel 2 X, Accel 2 Y";    //write the headers to the file
  if (serial == 1) {
    Serial.println(dataString);
    Serial.println(fileName);
  }
  // open the file. note that only one file can be open at a time,
  // so you have to close this one before opening another.
  File dataFile = SD.open(fileName, FILE_WRITE);
  // if the file is available, write to it:
  if (dataFile) {
    dataFile.println(dataString);
    dataFile.close();
    if (serial == 1) {
      Serial.println(dataString);
    }
  }
  //===delay so that we can set up ===
  for (int p = 0; p < 10; p++) {
    digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
    delay(200);                       // wait for a second
    digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
    delay(200);
  }
}

void loop() {
  //===logging===
  for (int i = 0; i < samples; i ++) {
    //read sensors
    sensors_event_t event1;
    sensors_event_t event2;
    accel1.getEvent(&event1);
    accel2.getEvent(&event2);
    data[i][0] = millis();
    data[i][1] = event1.acceleration.x;
    data[i][2] = event1.acceleration.y;
    data[i][3] = event2.acceleration.x;
    data[i][4] = event2.acceleration.y;
  }
    for (int i = 0; i < samples; i ++) {
    //read sensors
    sensors_event_t event1;
    sensors_event_t event2;
    accel1.getEvent(&event1);
    accel2.getEvent(&event2);
    data2[i][0] = millis();
    data2[i][1] = event1.acceleration.x;
    data2[i][2] = event1.acceleration.y;
    data2[i][3] = event2.acceleration.x;
    data2[i][4] = event2.acceleration.y;
  }
  
  if (serial == 1) {
    Serial.println("Sampling done");
  }

  //===printing out data===
  if (serial == 1) {
    Serial.println("Printing array");
    for (int i = 0; i < samples; i++) {
      for (int j = 0; j < 5; j++) {   //iterate through columns in row i
        Serial.print(data[i][j]);
        Serial.print(",");
      }
      Serial.println("");   //print new line at the end of each row
    }
    Serial.println("Printing Done");
    delay(1000);
  }

  //===SD CARD ===
  if (serial == 1) {
    Serial.println("Writing data to file");
  }
  digitalWrite(LED_BUILTIN, HIGH);    //show that we are writing to disk
  for (int i = 0; i < samples; i++) {
    Serial.println(i);
    dataString = String(data[i][0]) + "," + String(data[i][1]) + "," + String(data[i][2]) + "," + String(data[i][3]) + "," + String(data[i][4]);
    File dataFile = SD.open(fileName, FILE_WRITE);
    if (dataFile) {
      dataFile.println(dataString);
      dataFile.close();
      if (serial == 1) {
        Serial.println(dataString);
      }
    }
  }
    for (int i = 0; i < samples; i++) {
    Serial.println(i);
    dataString = String(data2[i][0]) + "," + String(data2[i][1]) + "," + String(data2[i][2]) + "," + String(data2[i][3]) + "," + String(data2[i][4]);
    File dataFile = SD.open(fileName, FILE_WRITE);
    if (dataFile) {
      dataFile.println(dataString);
      dataFile.close();
      if (serial == 1) {
        Serial.println(dataString);
      }
    }
  }

  digitalWrite(LED_BUILTIN, LOW);
  if (serial == 1) {
    Serial.println("Data saved to file");
    delay(5000);
  }


}

How many bytes of RAM does a float take on this board ?

How many bytes of RAM does it take to hold the 5000 floats in the [1000][5] array ?

How much RAM does the board have ?