Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r48922:b1d4b57f6170 Date: 2011-11-08 13:08 +0100 http://bitbucket.org/pypy/pypy/changeset/b1d4b57f6170/
Log: Don't use range() here, because it can raise MemoryError. diff --git a/pypy/rlib/rgc.py b/pypy/rlib/rgc.py --- a/pypy/rlib/rgc.py +++ b/pypy/rlib/rgc.py @@ -163,8 +163,10 @@ source_start, dest_start, length): # if the write barrier is not supported, copy by hand - for i in range(length): + i = 0 + while i < length: dest[i + dest_start] = source[i + source_start] + i += 1 return source_addr = llmemory.cast_ptr_to_adr(source) dest_addr = llmemory.cast_ptr_to_adr(dest) _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit