gb.getFreeRam

From Gamebuino Wiki
Revision as of 2014-05-20T20:04:56 by Rodot (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Description

Returns the amount of free RAM in number of bytes by measuring the distance between he heap and the stack. Results are not really consistent as the measure is taken in a single place in the program, and it doesn't take in account background operations (interrupts). When your Gamebuino acts randomly, you're probably out of RAM. More info here: Memory optimization.

Syntax

gb.getFreeRam();

Parameters

none

Returns

int: the amount of free RAM in number of bytes

Example

See also