Skip to content
🤔 Documentation issue? Report it

//leakcanary/shark/HprofHeader

HprofHeader

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 fun HprofHeader(heapDumpTimestamp: Long = System.currentTimeMillis(), version: HprofVersion = HprofVersion.ANDROID, identifierByteSize: Int = 4)

Types

Name Summary
Companion object Companion

Properties

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