File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232#include "py/gc.h"
3333#include "supervisor/shared/display.h"
3434
35- #define CIRCUITPY_SUPERVISOR_ALLOC_COUNT (12)
35+ enum {
36+ CIRCUITPY_SUPERVISOR_ALLOC_COUNT =
37+ // stack + heap
38+ 2
39+ #ifdef EXTERNAL_FLASH_DEVICES
40+ + 1
41+ #endif
42+ #if CIRCUITPY_USB_MIDI
43+ + 1
44+ #endif
45+ #if CIRCUITPY_DISPLAYIO
46+ #if CIRCUITPY_TERMINALIO
47+ + 1
48+ #endif
49+ + CIRCUITPY_DISPLAY_LIMIT * (
50+ // Maximum needs of one display: max(4 if RGBMATRIX, 1 if SHARPDISPLAY, 0)
51+ #if CIRCUITPY_RGBMATRIX
52+ 4
53+ #elif CIRCUITPY_SHARPDISPLAY
54+ 1
55+ #else
56+ 0
57+ #endif
58+ )
59+ #endif
60+ };
3661
3762// The lowest two bits of a valid length are always zero, so we can use them to mark an allocation
3863// as a hole (freed by the client but not yet reclaimed into the free middle) and as movable.
You can’t perform that action at this time.
0 commit comments