[pypy-svn] r58573 - pypy/branch/gc-experiments/pypy/rpython/memory/gc
fijal at codespeak.net
fijal at codespeak.net
Thu Oct 2 16:31:37 CEST 2008
Author: fijal
Date: Thu Oct 2 16:31:35 2008
New Revision: 58573
Modified:
pypy/branch/gc-experiments/pypy/rpython/memory/gc/markcompact.py
Log:
Always run tests before checking in. Even trivial stuff.
Modified: pypy/branch/gc-experiments/pypy/rpython/memory/gc/markcompact.py
==============================================================================
--- pypy/branch/gc-experiments/pypy/rpython/memory/gc/markcompact.py (original)
+++ pypy/branch/gc-experiments/pypy/rpython/memory/gc/markcompact.py Thu Oct 2 16:31:35 2008
@@ -9,6 +9,7 @@
from pypy.rpython.lltypesystem.llmemory import NULL, raw_malloc_usage
from pypy.rlib.rarithmetic import ovfcheck
from pypy.rpython.lltypesystem.lloperation import llop
+from pypy.rlib.objectmodel import we_are_translated
GCFLAG_MARKBIT = MovingGCBase.first_unused_gcflag
@@ -180,9 +181,13 @@
self.update_objects_with_id()
self.compact(resizing)
if not resizing:
- llarena.arena_reset(finaladdr, self.space_size, True)
+ size = toaddr + self.space_size - finaladdr
+ llarena.arena_reset(finaladdr, size, True)
else:
- llarena.arena_free(self.space)
+ if we_are_translated():
+ # because we free stuff already in raw_memmove, we
+ # would get double free here. Let's free it anyway
+ llarena.arena_free(self.space)
self.space = toaddr
self.free = finaladdr
self.top_of_space = toaddr + self.space_size
More information about the Pypy-commit
mailing list