HprofHeader

data class HprofHeader(heapDumpTimestamp: Long, version: HprofVersion, identifierByteSize: Int)

Represents the header metadata of a Hprof file.

Constructors

HprofHeader
Link copied to clipboard
fun HprofHeader(heapDumpTimestamp: Long = System.currentTimeMillis(), version: HprofVersion = HprofVersion.ANDROID, identifierByteSize: Int = 4)

Types

Companion
Link copied to clipboard
object Companion

Properties

heapDumpTimestamp
Link copied to clipboard
val heapDumpTimestamp: Long

Unix timestamp at which the heap was dumped.

identifierByteSize
Link copied to clipboard
val identifierByteSize: Int = 4

Size of Hprof identifiers. Identifiers are used to represent UTF8 strings, objects, stack traces, etc. They can have the same size as host pointers or sizeof(void*), but are not required to be.

recordsPosition
Link copied to clipboard
val recordsPosition: Int

How many bytes from the beginning of the file can we find the hprof records at. Version string, 0 delimiter (1 byte), identifier byte size int (4 bytes) ,timestamp long (8 bytes)

version
Link copied to clipboard
val version: HprofVersion

Hprof version, which is tied to the runtime where the heap was dumped.