Measure SDK captures the following to help monitor memory:
A worker thread reads the following properties every 2 seconds and reports them to Measure:
- Max heap size - collected using Runtime.maxMemory.
- Total heap size - collected using Runtime.totalMemory.
- Free heap size - collected using Runtime.freeMemory.
- RSS (Resident set size) - collected by reading the proc/pid/statm file.
- Total PSS (Proportional set size) - collected using Debug.getMemoryInfo.
- Native total heap size - collected using Debug.getNativeHeapSize.
- Native free heap size - collected using Debug.getNativeFreeHeapSize.
Checkout all the data collected for memory usage in the Memory Usage Event section.
Measure tracks all trim memory triggered by the OS, along with the trim level. Trim memory and the level reported can provide clues about memory availability.
Checkout all the data collected for trim memory in the Trim Memory Event section.