Do mem.current_bytes_allocated and mem.total_bytes_allocated mean something useful?

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
crayoz
Posts: 1
Joined: Thu Mar 21, 2019 11:43 pm

Do mem.current_bytes_allocated and mem.total_bytes_allocated mean something useful?

Post by crayoz » Fri Mar 22, 2019 12:16 am

Hello,

Checking the GC code and a way to find the current available RAM I found that gc.mem_free() solves my problem. But then I checked these 2 mem members and they just keep increasing with the calls to m_malloc and decreased sometimes with calls to m_free. It looks like gc.collect() doesn't have any effect on them. In some programs the values can end up with big values. Bigger than the bytes assigned to the heap. I am starting to suspect that they were useful on counting references algorithm. Am I right?

Thanks,

Post Reply