Esempio n. 1
0
 def __init__(self, config, space_size=4096,
              min_next_collect_after=128, **kwds):
     import py
     py.test.skip("the 'markcompact' gc needs fixing for custom tracers")
     #
     MovingGCBase.__init__(self, config, **kwds)
     self.space_size = space_size
     self.min_next_collect_after = min_next_collect_after
Esempio n. 2
0
 def __init__(self,
              config,
              chunk_size=DEFAULT_CHUNK_SIZE,
              space_size=4096,
              max_space_size=sys.maxint // 2 + 1):
     self.param_space_size = space_size
     self.param_max_space_size = max_space_size
     MovingGCBase.__init__(self, config, chunk_size)
Esempio n. 3
0
    def __init__(self, config, space_size=4096, min_next_collect_after=128, **kwds):
        import py

        py.test.skip("the 'markcompact' gc needs fixing for custom tracers")
        #
        MovingGCBase.__init__(self, config, **kwds)
        self.space_size = space_size
        self.min_next_collect_after = min_next_collect_after
Esempio n. 4
0
 def __init__(self,
              config,
              space_size=4096,
              max_space_size=sys.maxint // 2 + 1,
              **kwds):
     self.param_space_size = space_size
     self.param_max_space_size = max_space_size
     MovingGCBase.__init__(self, config, **kwds)
Esempio n. 5
0
 def __init__(self, chunk_size=DEFAULT_CHUNK_SIZE, space_size=4096,
              max_space_size=sys.maxint//2+1):
     MovingGCBase.__init__(self)
     self.space_size = space_size
     self.max_space_size = max_space_size
     self.gcheaderbuilder = GCHeaderBuilder(self.HDR)
     self.AddressStack = get_address_stack(chunk_size)
     self.AddressDeque = get_address_deque(chunk_size)
     self.finalizer_lock_count = 0
     self.red_zone = 0
Esempio n. 6
0
 def setup(self):
     if self.config.gcconfig.debugprint:
         self.program_start_time = time.time()
     self.space = llarena.arena_malloc(self.space_size, True)
     ll_assert(bool(self.space), "couldn't allocate arena")
     self.free = self.space
     self.top_of_space = self.space + self.next_collect_after
     MovingGCBase.setup(self)
     self.objects_with_finalizers = self.AddressDeque()
     self.objects_with_weakrefs = self.AddressStack()
     self.tid_backup = lltype.nullptr(self.TID_BACKUP)
Esempio n. 7
0
 def setup(self):
     if self.config.gcconfig.debugprint:
         self.program_start_time = time.time()
     self.tospace = llarena.arena_malloc(self.space_size, True)
     ll_assert(bool(self.tospace), "couldn't allocate tospace")
     self.top_of_space = self.tospace + self.space_size
     self.fromspace = llarena.arena_malloc(self.space_size, True)
     ll_assert(bool(self.fromspace), "couldn't allocate fromspace")
     self.free = self.tospace
     MovingGCBase.setup(self)
     self.objects_with_finalizers = self.AddressDeque()
     self.objects_with_weakrefs = self.AddressStack()
Esempio n. 8
0
    def setup(self):
        self.space_size = self.param_space_size
        self.next_collect_after = self.param_space_size / 2  # whatever...

        if self.config.gcconfig.debugprint:
            self.program_start_time = time.time()
        self.space = llarena.arena_malloc(self.space_size, True)
        ll_assert(bool(self.space), "couldn't allocate arena")
        self.free = self.space
        self.top_of_space = self.space + self.next_collect_after
        MovingGCBase.setup(self)
        self.objects_with_finalizers = self.AddressDeque()
        self.objects_with_weakrefs = self.AddressStack()
        self.tid_backup = lltype.nullptr(self.TID_BACKUP)
Esempio n. 9
0
    def setup(self):
        envsize = env.read_from_env("PYPY_MARKCOMPACTGC_MAX")
        if envsize >= 4096:
            self.space_size = envsize & ~4095
        mincollect = env.read_from_env("PYPY_MARKCOMPACTGC_MIN")
        if mincollect >= 4096:
            self.min_next_collect_after = mincollect

        # self.program_start_time = time.time()
        self.space = llarena.arena_malloc(self.space_size, False)
        if not self.space:
            raise CannotAllocateGCArena
        self.free = self.space
        MovingGCBase.setup(self)
        self.objects_with_finalizers = self.AddressDeque()
        self.tid_backup = lltype.nullptr(TID_BACKUP)
        self.next_collect_after = self.next_collection(0, 0, 0)
Esempio n. 10
0
    def setup(self):
        envsize = env.read_from_env('PYPY_MARKCOMPACTGC_MAX')
        if envsize >= 4096:
            self.space_size = envsize & ~4095
        mincollect = env.read_from_env('PYPY_MARKCOMPACTGC_MIN')
        if mincollect >= 4096:
            self.min_next_collect_after = mincollect

        #self.program_start_time = time.time()
        self.space = llarena.arena_malloc(self.space_size, False)
        if not self.space:
            raise CannotAllocateGCArena
        self.free = self.space
        MovingGCBase.setup(self)
        self.objects_with_finalizers = self.AddressDeque()
        self.tid_backup = lltype.nullptr(TID_BACKUP)
        self.next_collect_after = self.next_collection(0, 0, 0)
Esempio n. 11
0
    def setup(self):
        #self.total_collection_time = 0.0
        self.total_collection_count = 0

        self.space_size = self.param_space_size
        self.max_space_size = self.param_max_space_size
        self.red_zone = 0

        #self.program_start_time = time.time()
        self.tospace = llarena.arena_malloc(self.space_size, True)
        ll_assert(bool(self.tospace), "couldn't allocate tospace")
        self.top_of_space = self.tospace + self.space_size
        self.fromspace = llarena.arena_malloc(self.space_size, True)
        ll_assert(bool(self.fromspace), "couldn't allocate fromspace")
        self.free = self.tospace
        MovingGCBase.setup(self)
        self.objects_with_finalizers = self.AddressDeque()
        self.objects_with_weakrefs = self.AddressStack()
Esempio n. 12
0
    def setup(self):
        #self.total_collection_time = 0.0
        self.total_collection_count = 0

        self.space_size = self.param_space_size
        self.max_space_size = self.param_max_space_size
        self.red_zone = 0

        #self.program_start_time = time.time()
        self.tospace = llarena.arena_malloc(self.space_size, True)
        ll_assert(bool(self.tospace), "couldn't allocate tospace")
        self.top_of_space = self.tospace + self.space_size
        self.fromspace = llarena.arena_malloc(self.space_size, True)
        ll_assert(bool(self.fromspace), "couldn't allocate fromspace")
        self.free = self.tospace
        MovingGCBase.setup(self)
        self.objects_with_finalizers = self.AddressDeque()
        self.objects_with_weakrefs = self.AddressStack()
Esempio n. 13
0
 def __init__(self, config, chunk_size=DEFAULT_CHUNK_SIZE, space_size=4096):
     import py; py.test.skip("Disabled for now, sorry")
     self.param_space_size = space_size
     MovingGCBase.__init__(self, config, chunk_size)
Esempio n. 14
0
 def __init__(self, config, chunk_size=DEFAULT_CHUNK_SIZE, space_size=4096,
              max_space_size=sys.maxint//2+1):
     MovingGCBase.__init__(self, config, chunk_size)
     self.space_size = space_size
     self.max_space_size = max_space_size
     self.red_zone = 0
Esempio n. 15
0
 def __init__(self, config, chunk_size=DEFAULT_CHUNK_SIZE, space_size=4096,
              max_space_size=sys.maxint//2+1):
     self.param_space_size = space_size
     self.param_max_space_size = max_space_size
     MovingGCBase.__init__(self, config, chunk_size)
Esempio n. 16
0
 def __init__(self, config, chunk_size=DEFAULT_CHUNK_SIZE, space_size=4096):
     MovingGCBase.__init__(self, config, chunk_size)
     self.space_size = space_size
     self.next_collect_after = space_size/2 # whatever...
Esempio n. 17
0
 def __init__(self, config, space_size=4096,
              min_next_collect_after=128, **kwds):
     MovingGCBase.__init__(self, config, **kwds)
     self.space_size = space_size
     self.min_next_collect_after = min_next_collect_after
Esempio n. 18
0
 def marked(self, obj):
     # should work both if tid contains a CombinedSymbolic (for dying
     # objects, at this point), or a plain integer.
     return MovingGCBase.header(self, obj).tid & GCFLAG_MARKBIT
Esempio n. 19
0
 def header_forwarded(self, addr):
     # like header(), but asserts that we have a forwarding header
     hdr = MovingGCBase.header(self, addr)
     if not we_are_translated():
         assert is_valid_int(hdr.tid)
     return hdr
Esempio n. 20
0
 def header(self, addr):
     # like header(), but asserts that we have a normal header
     hdr = MovingGCBase.header(self, addr)
     if not we_are_translated():
         assert isinstance(hdr.tid, llgroup.CombinedSymbolic)
     return hdr
Esempio n. 21
0
 def header(self, addr):
     # like header(), but asserts that we have a normal header
     hdr = MovingGCBase.header(self, addr)
     if not we_are_translated():
         assert isinstance(hdr.tid, llgroup.CombinedSymbolic)
     return hdr
Esempio n. 22
0
 def header_forwarded(self, addr):
     # like header(), but asserts that we have a forwarding header
     hdr = MovingGCBase.header(self, addr)
     if not we_are_translated():
         assert isinstance(hdr.tid, int)
     return hdr
Esempio n. 23
0
 def __init__(self, config, space_size=4096, max_space_size=sys.maxint//2+1,
              **kwds):
     self.param_space_size = space_size
     self.param_max_space_size = max_space_size
     MovingGCBase.__init__(self, config, **kwds)
Esempio n. 24
0
 def __init__(self, config, chunk_size=DEFAULT_CHUNK_SIZE, space_size=4096):
     import py
     py.test.skip("Disabled for now, sorry")
     self.param_space_size = space_size
     MovingGCBase.__init__(self, config, chunk_size)
Esempio n. 25
0
 def marked(self, obj):
     # should work both if tid contains a CombinedSymbolic (for dying
     # objects, at this point), or a plain integer.
     return MovingGCBase.header(self, obj).tid & GCFLAG_MARKBIT