Skip to content

Commit 17c9d2b

Browse files
MichaelBellGadgetoid
authored andcommitted
ports/rp2: Fix garbage collection with large heap.
Signed-off-by: Mike Bell <[email protected]>
1 parent 5c9bee0 commit 17c9d2b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ports/rp2/mpconfigport.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,16 @@
7171
#define MICROPY_CONFIG_ROM_LEVEL (MICROPY_CONFIG_ROM_LEVEL_EXTRA_FEATURES)
7272
#endif
7373

74+
#ifndef MICROPY_HW_ENABLE_PSRAM
75+
#define MICROPY_HW_ENABLE_PSRAM (0)
76+
#endif
77+
7478
// Memory allocation policies
79+
#if MICROPY_HW_ENABLE_PSRAM
80+
#define MICROPY_GC_STACK_ENTRY_TYPE uint32_t
81+
#else
7582
#define MICROPY_GC_STACK_ENTRY_TYPE uint16_t
83+
#endif
7684
#ifndef MICROPY_GC_SPLIT_HEAP
7785
#define MICROPY_GC_SPLIT_HEAP (0) // whether PSRAM is added to or replaces the heap
7886
#endif

0 commit comments

Comments
 (0)