Exemplo n.º 1
0
 def __init__(self, memory_pressure):
     if memory_pressure:
         self.total_memory_pressure = rgc.get_stats(
             rgc.TOTAL_MEMORY_PRESSURE)
     else:
         self.total_memory_pressure = -1
     self.total_gc_memory = rgc.get_stats(rgc.TOTAL_MEMORY)
     self.total_allocated_memory = rgc.get_stats(rgc.TOTAL_ALLOCATED_MEMORY)
     self.peak_memory = rgc.get_stats(rgc.PEAK_MEMORY)
     self.peak_allocated_memory = rgc.get_stats(rgc.PEAK_ALLOCATED_MEMORY)
     self.jit_backend_allocated = jit_hooks.stats_asmmemmgr_allocated(None)
     self.jit_backend_used = jit_hooks.stats_asmmemmgr_used(None)
     self.total_arena_memory = rgc.get_stats(rgc.TOTAL_ARENA_MEMORY)
     self.total_rawmalloced_memory = rgc.get_stats(
         rgc.TOTAL_RAWMALLOCED_MEMORY)
     self.peak_arena_memory = rgc.get_stats(rgc.PEAK_ARENA_MEMORY)
     self.peak_rawmalloced_memory = rgc.get_stats(
         rgc.PEAK_RAWMALLOCED_MEMORY)
     self.nursery_size = rgc.get_stats(rgc.NURSERY_SIZE)
Exemplo n.º 2
0
def get_stats_asmmemmgr(space):
    """Returns the raw memory currently used by the JIT backend,
    as a pair (total_memory_allocated, memory_in_use)."""
    m1 = jit_hooks.stats_asmmemmgr_allocated(None)
    m2 = jit_hooks.stats_asmmemmgr_used(None)
    return space.newtuple([space.newint(m1), space.newint(m2)])
Exemplo n.º 3
0
def get_stats_asmmemmgr(space):
    """Returns the raw memory currently used by the JIT backend,
    as a pair (total_memory_allocated, memory_in_use)."""
    m1 = jit_hooks.stats_asmmemmgr_allocated(None)
    m2 = jit_hooks.stats_asmmemmgr_used(None)
    return space.newtuple([space.wrap(m1), space.wrap(m2)])