Heap usage
# help
t
Hi! I am currently printing the heap report when free memory is below 10k or above 50k to see where the memory is used. As you can see, the big difference between the 2 screenshots is "process 0x3ffd1018", which pretty much accounts for the 40k. Is there any way of knowing more about what that process is doing?
e
There's one system process and then there's your own. I guess you are not running Jaguar on this.
In your own program you can run
Copy code
print_objects "myprog" --gc
To get a report for the current process.
This device has PSRAM?
t
No PSRAM. I'll try the myprog thing 🙂
e
Without PSRAM I would expect the heap metadata to be half the size. Which version is this?
t
This is with version 69.
e
OK that's new enough.
t
Should I worry about this? 😅
e
I'm going to tune the heuristics so you use 12k less of Metadata.
https://github.com/toitlang/toit/pull/1531 is the change, which should give you 12k.
t
Thanks. Will try it out 👍
10 Views