Source: https://mokxi.com/errors/ram-overflow-low-memory
Updated: 2026-11-16

Home / Errors
Arduino build error

# Global variables use 2400 bytes (117%) of dynamic memory

RAM holds your variables while the sketch runs. An Uno has 2,048 bytes of it. The global variables alone are bigger than that.

Try the fixed sketch in Mokxi See the causes

- Build error
- 2 common causes
- Seen 30 times in failed builds on Mokxi in the 30 days to November 16, 2026.

The message

## What the Arduino IDE prints

Output window

Use smaller types, keep constant data in flash, or choose a board with more RAM.

Mokxi's linker says the global variables do not fit in the board's RAM.

Causes

## The 2 usual causes with the fix

### 1A big array of a bigger type than it needs

An int takes two bytes. Readings from 0 to 255 fit in a byte, so the same array takes half the space.

Broken

Fixed

Mokxi’s build tab says: The global variables need more than the 2 KB of RAM this board has

Try this fix in Mokxi

### 2Data you only read is kept in RAM

A table is copied into RAM at start-up unless it is const and marked PROGMEM. Read it back with pgm_read_byte.

Broken

Fixed

Mokxi’s build tab says: The global variables need more than the 2 KB of RAM this board has

Try this fix in Mokxi

FAQ

## Questions and answers

### How much RAM does an Uno have?

The ATmega328P has 2 KB. The Mega 2560 has 8 KB, and ESP32 boards have hundreds of kilobytes.

### What does F("text") do?

It keeps a string literal in flash instead of copying it into RAM. Serial.println(F("hello")) saves five bytes plus one per character.

### Why does it run out only after I add a library?

Many libraries reserve buffers at start-up. A display library often takes a kilobyte for its frame.

Next

## More errors and the longer guide

- text section exceeds available space in board
- undefined reference to `readSensor()'

Every Arduino compile error All Arduino errors
