How to determine heap usage?

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
cduran
Posts: 80
Joined: Thu Mar 17, 2016 4:52 pm

How to determine heap usage?

Post by cduran » Wed Aug 07, 2019 9:05 pm

Running mp on an ARM using the minimal build. I would like to know if there are any built in methods for analyzing heap usage.

User avatar
mattyt
Posts: 410
Joined: Mon Jan 23, 2017 6:39 am

Re: How to determine heap usage?

Post by mattyt » Thu Aug 08, 2019 6:02 am

I suspect you're looking for gc.mem_free(). I think it's implemented for minimal ARM..?

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: How to determine heap usage?

Post by pythoncoder » Thu Aug 08, 2019 7:14 am

Or micropython.mem_info(), if that's implemented.
Peter Hinch
Index to my micropython libraries.

Post Reply