Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a4b7f32

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

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
import _thread
34

@@ -70,6 +71,12 @@ def top(update_interval_ms=1000, timeout_ms=None, thread_names={}):
7071
print("INFO: Platform does not support listing active tasks.\x1b[K")
7172
line_count += 1
7273

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

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /