Code: Select all
import ustack
print(ustack.max_stack_usage())
Thank you!
Moderators: adafruit_support_bill, adafruit
Code: Select all
import ustack
print(ustack.max_stack_usage())
Code: Select all
import gc
gc.mem_free()
Code: Select all
gc.collect()
Code: Select all
Adafruit CircuitPython 2.1.0 on 2017-10-17; Adafruit Metro M0 Express with samd21g18
>>> import ustack
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'ustack'
>>> import gc
>>> gc.collect()
>>> gc.mem_free()
19680
Code: Select all
...
testing the memory usage
testing the memory usage
testing the memory usage
Free Memory at Start: 11664
Free Memory at End : 11568
Memory Allocated at Start: 8320
Memory Allocated at End : 8560
Code: Select all
code.py output:
MemoryError: memory allocation failed, allocating 1282 bytes