summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorScott Shawcroft <scott.shawcroft@gmail.com>2017-05-05 12:04:20 -0700
committerScott Shawcroft <scott.shawcroft@gmail.com>2017-05-05 12:04:20 -0700
commitc6d539ace36b9be698a3a248793ee948ba269e68 (patch)
treed5d0e5e385cc87932e0e1cd95e80a93a2053a4f2 /py
parent5ad426124bf15a50edd6aeda50a228933dee8507 (diff)
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
Diffstat (limited to 'py')
-rw-r--r--py/gc.c4
1 files changed, 3 insertions, 1 deletions
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