I found only global memory information functions for MicroPython, and only object specific memory usage function in Python3:
https://docs.micropython.org/en/latest/ ... ained.html
micropython.mem_info() Print a summary of RAM utilisation.
gc.mem_free() Return the free heap size in bytes.
https://docs.python.org/3/library/sys.h ... module-sys
sys.getsizeof(object[, default]) Return the size of an object in bytes. ...
Is there an equivalent to sys.getsizeof(object) somewhere in MicroPython?
If not, can the object memory be determined otherwise in MicroPython?
memory usage: MicoPython vs. Python3
memory usage: MicoPython vs. Python3
Pico-W Access Point static file webserver:
https://github.com/Hermann-SW/pico-w
Tiny MicroPython robots (the PCB IS the robot platform)
viewtopic.php?f=5&t=11454
webrepl_client.py
https://github.com/Hermann-SW/webrepl#webrepl-shell
https://github.com/Hermann-SW/pico-w
Tiny MicroPython robots (the PCB IS the robot platform)
viewtopic.php?f=5&t=11454
webrepl_client.py
https://github.com/Hermann-SW/webrepl#webrepl-shell
Re: memory usage: MicoPython vs. Python3
Yes there is
But this unary operator has to be implemented by each type on which you wish to use it; this cannot be enforced at compile-time.
Code: Select all
// Whether to provide "sys.getsizeof" function
#define MICROPY_PY_SYS_GETSIZEOF (0)