Delphi / Object Pascal · Exception

Runtime Error 203: Heap overflow, EOutOfMemory

What does Runtime Error 203: Heap overflow, EOutOfMemory mean in Delphi / Object Pascal?

A memory allocation request could not be satisfied because the heap or the address space available to the process was exhausted.

Runtime Error 203: Heap overflow, EOutOfMemoryDelphi (VCL) · Delphi (FireMonkey)

Condition

A memory allocation request could not be satisfied because the heap or the address space available to the process was exhausted.

Fix

Check for a leak, most commonly an object created and never freed inside a loop, before assuming the machine simply needs more memory. A genuine one-time large allocation failing is far less common in practice than a slow leak that eventually exhausts what is available.

Pending source verification. Not yet checked against official documentation.

Related exception