[pypy-svn] r58799 - pypy/branch/gc-experiments/pypy/rpython/memory/gc
fijal at codespeak.net
fijal at codespeak.net
Wed Oct 8 11:58:33 CEST 2008
Author: fijal
Date: Wed Oct 8 11:58:32 2008
New Revision: 58799
Modified:
pypy/branch/gc-experiments/pypy/rpython/memory/gc/markcompact.py
Log:
Have a init_gc_object_immortal in markcompact gc
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 Wed Oct 8 11:58:32 2008
@@ -79,6 +79,13 @@
hdr.tid = typeid | flags
hdr.forward_ptr = NULL
+ def init_gc_object_immortal(self, addr, typeid, flags=0):
+ hdr = llmemory.cast_adr_to_ptr(addr, lltype.Ptr(self.HDR))
+ hdr.tid = typeid | flags | GCFLAG_EXTERNAL
+ hdr.forward_ptr = NULL
+ # immortal objects always have GCFLAG_FORWARDED set;
+ # see get_forwarding_address().
+
def malloc_fixedsize_clear(self, typeid, size, can_collect,
has_finalizer=False, contains_weakptr=False):
assert can_collect
More information about the Pypy-commit
mailing list