This a demo repository for a problem I am having with cpython3 and pypy3 where the program consumes a lot of RAM quickly on Fedora 31.
It is a work-in-progress solution to this project euler challenge.
Upon further investigation, using tracemalloc turned out to be good enough. Thanks to everyone who helped.
Run gmake run
.
You can find a screenshot of htop, and a similar text transcript of the terminal, where it shows it consumes over 1-2 GB of RAM well before reaching k=1,000 (out of max k=10,000).
I tried using https://pypi.org/project/memory-profiler/ but it slowed down the code and did not display a significant memory increment.
I tried using https://docs.python.org/3/library/tracemalloc.html but its reported allocations were small.