README
Mwrap SourceLocation
MwrapRack

Methods

#allocations #each #frees #max_lifespan #mean_lifespan #name #total

class Mwrap::SourceLocation

Represents a location in source code or library address which calls a memory allocation. It is updated automatically as allocations are made, so there is no need to reload or reread it from Mwrap#[]. This class is only available since mwrap 2.0.0+.

Public Instance Methods

allocations () source

The number of allocations made from this location

loc = Mwrap[location]
loc.each { |size,generation| ... } source

Iterates through live allocations for a given Mwrap::SourceLocation, yielding the size (in bytes) and generation of each allocation. The generation is the value of the GC.count method at the time the allocation was made.

This functionality is only available in mwrap 2.0.0+

frees () source

The number of frees made from this location

max_lifespan () source

The maximum age (in GC generations) of an allocation before it was freed. This does not account for live allocations.

mean_lifespan () source

The the mean lifespan (in GC generations) of allocations made from this location. This does not account for live allocations.

name () source

Returns a frozen String location of the given SourceLocation object.

total () source

The total number of bytes allocated from this location


Pages Classes Methods
mail archives: https://80x24.org/mwrap-public/
	nntps://news.public-inbox.org/inbox.comp.lang.ruby.mwrap 
	imaps://;AUTH=ANONYMOUS@80x24.org/inbox.comp.lang.ruby.mwrap.0 
public: mwrap-public@80x24.org
source code: git clone https://80x24.org/mwrap.git