py/modmicropython: Add stack_use, heap_lock and heap_unlock functions.
micropython.stack_use() returns an integer being the number of bytes used on the stack. micropython.heap_lock() and heap_unlock() can be used to prevent the memory manager from allocating anything on the heap. Calls to these are allowed to be nested.
This commit is contained in:
@@ -432,6 +432,13 @@ Q(mem_peak)
|
||||
#endif
|
||||
Q(mem_info)
|
||||
Q(qstr_info)
|
||||
#if MICROPY_STACK_CHECK
|
||||
Q(stack_use)
|
||||
#endif
|
||||
#endif
|
||||
#if MICROPY_ENABLE_GC
|
||||
Q(heap_lock)
|
||||
Q(heap_unlock)
|
||||
#endif
|
||||
|
||||
#if MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF && (MICROPY_EMERGENCY_EXCEPTION_BUF_SIZE == 0)
|
||||
|
||||
Reference in New Issue
Block a user