When using C interop on iOS, is there a good way to measure C-managed memory vs Kotlin/Native managed memory? XCode just shows overall memory usage. I’d like to know what’s causing a sawtooth shape of memory that ranges from 1-2GB. I know the C library has it’s own ARC-like proto-GC.
r
ribesg
10/19/2022, 2:02 PM
Using the Instruments thingy you can find what allocates what and when with stacktraces of each allocation call
I used that once. Is there a good UI that would show an overview, like how Android’s memory graph shows NDK and JVM separately? I’d imagine the ObjHeader would make it fairly obvious which memory is managed by Kotlin. The biggest issue with intrumentation is the time it takes to download and analyze it.
j
Jimmy
10/20/2022, 12:30 AM
if its 1-2gb i would expect that to show pretty obviously in a snapshot comparison, so I would take 2 snapshots of low end and high end, then you should be able to quickly narrow down what the memory is specifically to start to dig further