You are currently viewing Measuring object memory usage outside of an Android context

Measuring object memory usage outside of an Android context

I’m interested in profiling the memory usage of a collection of similar objects and how various tweaks to the relevant class definition changes this.

I’m aware of java.lang.instrument.Instrumentation and the java agent, although I have never made use of them. I presume they could be applied in Kotlin, hopefully including the agent jar implementation itself, but I have not found any discussion or example of this to confirm that before I start screwing around myself.

Anyone tried this or have any thoughts on the topic?

submitted by /u/fgwc
[link] [comments]