Skip to content
🤔 Documentation issue? Report it

//leakcanary-repo/shark/HprofHeader

HprofHeader

[jvm]\ data class HprofHeader(val heapDumpTimestamp: Long = System.currentTimeMillis(), val version: HprofVersion = HprofVersion.ANDROID, val identifierByteSize: Int = 4)

Represents the header metadata of a Hprof file.

Constructors

HprofHeader [jvm]
constructor(heapDumpTimestamp: Long = System.currentTimeMillis(), version: HprofVersion = HprofVersion.ANDROID, identifierByteSize: Int = 4)

Types

Name Summary
Companion [jvm]
object Companion

Properties

Name Summary
heapDumpTimestamp [jvm]
val heapDumpTimestamp: Long
Unix timestamp at which the heap was dumped.
identifierByteSize [jvm]
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 [jvm]
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 [jvm]
val version: HprofVersion
Hprof version, which is tied to the runtime where the heap was dumped.