File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change 32
32
#include "py/gc.h"
33
33
#include "supervisor/shared/display.h"
34
34
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
+ };
36
61
37
62
// The lowest two bits of a valid length are always zero, so we can use them to mark an allocation
38
63
// 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