System calls

freeMemory()

System.freeMemory, freeMemory

Since 0.4.4:

Retrieves the amount of free memory in the system in bytes.

uint32_t freemem = System.freeMemory();
Serial.print("free memory: ");
Serial.println(freemem);

To get the largest allocatable block, see fragmentation.