Memory Usage

SNAP Protocol

Type

Allocated

Global Buffer Pool

46

UART Budget

36

Mesh Routing Budget

10

RPC Budget

10

Radio Budget

10

STDOUT Budget

10

SNAPpy Virtual Machine

Both strings and byte lists work from the same pool of buffers.

Type

Number of Tiny Strings

16

Tiny String Size

1 character

Number of Small Strings

32

Small String Size

up to 16 characters

Number of Medium Strings

16

Medium String Size

up to 126 characters

Number of Large Strings

9

Large String Size

up to 255 characters

System

Type

Global Variables

255

Concurrent Local Variables

64

Maximum Call Stack Depth

16

Note

Byte lists defined in global spaces effectively contain multiple (one-byte) variables in one global variable space. Byte lists defined in global spaces must be copied to RAM before they can be manipulated. One way to do this is:

list = list[:]