Skip to content

Commit 08e09af

Browse files
committed
utop: Print MicroPython memory info.
Signed-off-by: Daniël van de Giessen <daniel@dvdgiessen.nl>
1 parent 0d60de6 commit 08e09af

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

micropython/utop/utop.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import micropython
12
import time
23

34
try:
@@ -72,6 +73,12 @@ def top(update_interval_ms=1000, timeout_ms=None, thread_names={}):
7273
print("INFO: Platform does not support listing active tasks.\x1b[K")
7374
line_count += 1
7475

76+
print("\x1b[K")
77+
line_count += 1
78+
print("MicroPython ", end="")
79+
micropython.mem_info()
80+
line_count += 3
81+
7582
if previous_line_count > line_count:
7683
for _ in range(previous_line_count - line_count):
7784
print("\x1b[K")

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy