Example #1
0
 def setup(self):
     GCBase.setup(self)
     self.heap_usage = 0          # at the end of the latest collection
     self.bytes_malloced = 0      # since the latest collection
     self.bytes_malloced_threshold = self.param_start_heap_size
     self.total_collection_time = 0.0
     self.malloced_objects = lltype.nullptr(self.HDR)
     self.malloced_objects_with_finalizer = lltype.nullptr(self.HDR)
     # these are usually only the small bits of memory that make a
     # weakref object
     self.objects_with_weak_pointers = lltype.nullptr(self.HDR)
     # pools, for x_swap_pool():
     #   'curpool' is the current pool, lazily allocated (i.e. NULL means
     #   the current POOL object is not yet malloc'ed).  POOL objects are
     #   usually at the start of a linked list of objects, via the HDRs.
     #   The exception is 'curpool' whose linked list of objects is in
     #   'self.malloced_objects' instead of in the header of 'curpool'.
     #   POOL objects are never in the middle of a linked list themselves.
     # XXX a likely cause for the current problems with pools is:
     # not all objects live in malloced_objects, some also live in
     # malloced_objects_with_finalizer and objects_with_weak_pointers
     self.curpool = lltype.nullptr(self.POOL)
     #   'poolnodes' is a linked list of all such linked lists.  Each
     #   linked list will usually start with a POOL object, but it can
     #   also contain only normal objects if the POOL object at the head
     #   was already freed.  The objects in 'malloced_objects' are not
     #   found via 'poolnodes'.
     self.poolnodes = lltype.nullptr(self.POOLNODE)
     self.collect_in_progress = False
     self.prev_collect_end_time = 0.0
Example #2
0
 def setup(self):
     GCBase.setup(self)
     self.heap_usage = 0  # at the end of the latest collection
     self.bytes_malloced = 0  # since the latest collection
     self.bytes_malloced_threshold = self.param_start_heap_size
     self.total_collection_time = 0.0
     self.malloced_objects = lltype.nullptr(self.HDR)
     self.malloced_objects_with_finalizer = lltype.nullptr(self.HDR)
     # these are usually only the small bits of memory that make a
     # weakref object
     self.objects_with_weak_pointers = lltype.nullptr(self.HDR)
     # pools, for x_swap_pool():
     #   'curpool' is the current pool, lazily allocated (i.e. NULL means
     #   the current POOL object is not yet malloc'ed).  POOL objects are
     #   usually at the start of a linked list of objects, via the HDRs.
     #   The exception is 'curpool' whose linked list of objects is in
     #   'self.malloced_objects' instead of in the header of 'curpool'.
     #   POOL objects are never in the middle of a linked list themselves.
     # XXX a likely cause for the current problems with pools is:
     # not all objects live in malloced_objects, some also live in
     # malloced_objects_with_finalizer and objects_with_weak_pointers
     self.curpool = lltype.nullptr(self.POOL)
     #   'poolnodes' is a linked list of all such linked lists.  Each
     #   linked list will usually start with a POOL object, but it can
     #   also contain only normal objects if the POOL object at the head
     #   was already freed.  The objects in 'malloced_objects' are not
     #   found via 'poolnodes'.
     self.poolnodes = lltype.nullptr(self.POOLNODE)
     self.collect_in_progress = False
     self.prev_collect_end_time = 0.0
Example #3
0
 def __init__(self, config, chunk_size=DEFAULT_CHUNK_SIZE, start_heap_size=4096):
     self.param_start_heap_size = start_heap_size
     GCBase.__init__(self, config, chunk_size)
Example #4
0
 def __init__(self, config, start_heap_size=4096, **kwds):
     self.param_start_heap_size = start_heap_size
     GCBase.__init__(self, config, **kwds)
Example #5
0
 def __init__(self,
              config,
              chunk_size=DEFAULT_CHUNK_SIZE,
              start_heap_size=4096):
     self.param_start_heap_size = start_heap_size
     GCBase.__init__(self, config, chunk_size)
Example #6
0
 def __init__(self, config, start_heap_size=4096, **kwds):
     self.param_start_heap_size = start_heap_size
     GCBase.__init__(self, config, **kwds)