Memory::ProfilerSourceMemoryProfilerAllocations

class Allocations

Ruby extensions to the C-defined Allocations class. The base Allocations class is defined in the C extension.

Definitions

def as_json(...)

Convert allocation statistics to JSON-compatible hash.

Signature

returns Hash

Allocation statistics as a hash.

Implementation

def as_json(...)
	{
		new_count: self.new_count,
		free_count: self.free_count,
		retained_count: self.retained_count,
	}
end

def to_json(...)

Convert allocation statistics to JSON string.

Signature

returns String

Allocation statistics as JSON.

Implementation

def to_json(...)
	as_json.to_json(...)
end