summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-01-09 20:37:49 +0000
committerDamien George <damien.p.george@gmail.com>2015-01-09 20:37:49 +0000
commit5d48f234d2eb865ff0d2648ed08ecc9d4b8c136a (patch)
tree9da7e4176f37f9e142623f6278b3d273cc76b6b0
parenta9a08620781df8f16bebf3a7eac1783446d7767b (diff)
downloadmicropython-5d48f234d2eb865ff0d2648ed08ecc9d4b8c136a.tar.gz
micropython-5d48f234d2eb865ff0d2648ed08ecc9d4b8c136a.zip
py: Make mem_info print correct remaining stack bytes.
-rw-r--r--py/modmicropython.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/modmicropython.c b/py/modmicropython.c
index 52b1cd0e5e..75f3e8dfe5 100644
--- a/py/modmicropython.c
+++ b/py/modmicropython.c
@@ -59,7 +59,7 @@ mp_obj_t mp_micropython_mem_info(mp_uint_t n_args, const mp_obj_t *args) {
m_get_total_bytes_allocated(), m_get_current_bytes_allocated(), m_get_peak_bytes_allocated());
#endif
#if MICROPY_STACK_CHECK
- printf("stack: " UINT_FMT " out of " INT_FMT "\n", mp_stack_usage(), MP_STATE_VM(stack_limit) - mp_stack_usage());
+ printf("stack: " UINT_FMT " out of " INT_FMT "\n", mp_stack_usage(), MP_STATE_VM(stack_limit));
#else
printf("stack: " UINT_FMT "\n", mp_stack_usage());
#endif