Mike Chambers
Well-known member
I'm working on a project that requires a very large amount of RAM. I've tried allocating 640 KB in two different ways.
I first tried to just declare a global array like so:
That won't link.
So I attempted to see if I could malloc it:
It failed.
What am I missing here as far as getting access to all of the memory?
I first tried to just declare a global array like so:
Code:
uint8_t RAM[655360];
That won't link.
So I attempted to see if I could malloc it:
Code:
uint8_t *RAM;
void setup() {
while (!Serial) { }
Serial.begin(9600);
RAM = (uint8_t *)malloc(655360UL);
if (RAM == NULL) {
Serial.println("Failed to allocate 640 KB!");
} else {
Serial.println("Successfully allocated 640 KB!");
}
}
It failed.
What am I missing here as far as getting access to all of the memory?