We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c4de2fd commit b238824Copy full SHA for b238824
supervisor/shared/memory.c
@@ -32,7 +32,32 @@
32
#include "py/gc.h"
33
#include "supervisor/shared/display.h"
34
35
-#define CIRCUITPY_SUPERVISOR_ALLOC_COUNT (12)
+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
44
45
+#if CIRCUITPY_DISPLAYIO
46
+ #if CIRCUITPY_TERMINALIO
47
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
58
+ )
59
60
+};
61
62
// The lowest two bits of a valid length are always zero, so we can use them to mark an allocation
63
// as a hole (freed by the client but not yet reclaimed into the free middle) and as movable.
0 commit comments