Exemplo 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
Exemplo 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)
Exemplo 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
Exemplo 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)
Exemplo 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
Exemplo 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)
Exemplo 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()
Exemplo 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)
Exemplo 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)
Exemplo 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)
Exemplo 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()
Exemplo 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()
Exemplo 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)
Exemplo 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
Exemplo 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)
Exemplo 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...
Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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)
Exemplo 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)
Exemplo 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