-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
support pypy - add gc.collect() #2
Comments
Hi Matti! Thanks for your interest. I'll be glad to work this into the code. Could you explain why PyPy requires forcing a collection before measuring memory usage? I'm curious. |
First CPython: its refcount garbage collection is triggered on exiting a frame, in a predictable and consistent way So if you want to clean out all the old objects, on CPython it is sufficient to exit a function, but on PyPy you need to explicitly ask for a GC collection cycle More about this can be found on the PyPy doc site http://pypy.readthedocs.io/en/latest/gc_info.html or on the RPython doc site http://rpython.readthedocs.io/en/latest/garbage_collection.html |
Wow! Thanks for the thorough answer. |
Thanks for this code
PyPy requires forcing a collection before measuring memory usage after a test. For me it was enough to modify the
runtest
code:would you rather get this as a pull request?
The text was updated successfully, but these errors were encountered: