From c6d539ace36b9be698a3a248793ee948ba269e68 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 5 May 2017 12:04:20 -0700 Subject: atmel-samd: Fix sporadic "syntax errors" The GC was deleting memory that was in use because its scan of the stack missed the very top. Switching to _estack fixes this by relying on the location from the linker. Fixes #124 --- py/gc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'py/gc.c') diff --git a/py/gc.c b/py/gc.c index 75fc82382..72eecd7ef 100644 --- a/py/gc.c +++ b/py/gc.c @@ -104,11 +104,13 @@ #ifdef LOG_HEAP_ACTIVITY volatile uint32_t change_me; - +#pragma GCC push_options +#pragma GCC optimize ("O0") void __attribute__ ((noinline)) gc_log_change(uint32_t start_block, uint32_t length) { change_me += start_block; change_me += length; // Break on this line. } +#pragma GCC pop_options #endif // TODO waste less memory; currently requires that all entries in alloc_table have a corresponding block in pool -- cgit v1.2.3