[pypy-issue] Issue #2590: finalizers heavily stress GC (pypy/pypy)

Philip Jenvey issues-reply at bitbucket.org
Thu Jun 22 01:02:37 EDT 2017

New issue 2590: finalizers heavily stress GC

Philip Jenvey:

@alex_gaynor's script demonstrates app level `__del__`s:


import random
import sys

class A(object):
	def __del__(self):

class B(object):

cls = {"A": A, "B": B}[sys.argv[1]]

while True:
	# Gibberish to make sure the JIT doesn't optimize the allocation away
	[cls()] * random.randint(1, 1)

"A" shooting RSS up to 1-2GB pretty quickly vs "B" holding steady =~ 20mb.

massif+pypy2-5.6 on "A":

More information about the pypy-issue mailing list