Skip to content

Commit 5d48f23

Browse files
committed
py: Make mem_info print correct remaining stack bytes.
1 parent a9a0862 commit 5d48f23

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

py/modmicropython.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ mp_obj_t mp_micropython_mem_info(mp_uint_t n_args, const mp_obj_t *args) {
5959
m_get_total_bytes_allocated(), m_get_current_bytes_allocated(), m_get_peak_bytes_allocated());
6060
#endif
6161
#if MICROPY_STACK_CHECK
62-
printf("stack: " UINT_FMT " out of " INT_FMT "\n", mp_stack_usage(), MP_STATE_VM(stack_limit) - mp_stack_usage());
62+
printf("stack: " UINT_FMT " out of " INT_FMT "\n", mp_stack_usage(), MP_STATE_VM(stack_limit));
6363
#else
6464
printf("stack: " UINT_FMT "\n", mp_stack_usage());
6565
#endif

0 commit comments

Comments
 (0)