Skip to content

Commit ae07ac1

Browse files
committed
Fix pystack size
Original code used uint32_t* so `/ sizeof(size_t)` was needed. It is a uint8_t* now so that division makes it 4x smaller. Whoops! Fixes #8574
1 parent bb12d36 commit ae07ac1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,13 @@ STATIC void start_mp(safe_mode_t safe_mode) {
199199
#if MICROPY_ENABLE_PYSTACK
200200
size_t pystack_size = 0;
201201
_pystack = _allocate_memory(safe_mode, "CIRCUITPY_PYSTACK_SIZE", CIRCUITPY_PYSTACK_SIZE, &pystack_size);
202-
mp_pystack_init(_pystack, _pystack + pystack_size / sizeof(size_t));
202+
mp_pystack_init(_pystack, _pystack + pystack_size);
203203
#endif
204204

205205
#if MICROPY_ENABLE_GC
206206
size_t heap_size = 0;
207207
_heap = _allocate_memory(safe_mode, "CIRCUITPY_HEAP_START_SIZE", CIRCUITPY_HEAP_START_SIZE, &heap_size);
208-
gc_init(_heap, _heap + heap_size / 4);
208+
gc_init(_heap, _heap + heap_size);
209209
#endif
210210
mp_init();
211211
mp_obj_list_init((mp_obj_list_t *)mp_sys_path, 0);

0 commit comments

Comments
 (0)