[TIMOB-7811] APIdoc: Android - review memory management and profiling guide
GitHub Issue | n/a |
---|---|
Type | Story |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-03-12T08:58:57.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Sprint 2012-05, Release 2.0.0 |
Components | Android |
Labels | n/a |
Reporter | Tim Poulsen |
Assignee | Ingo Muschenetz |
Created | 2012-01-27T11:03:43.000+0000 |
Updated | 2017-03-22T21:19:11.000+0000 |
Description
Please review https://wiki.appcelerator.org/display/guides/Managing+Memory+and+Finding+Leaks
* Confirm that Android memory limits are correct as noted
* Confirm that memory is released & garbage collected as noted on Android
* Document procedure for memory profiling with DDMS
Neeraj asked us to create tickets to track reviews of guides content, so it could be scheduled into sprints. In this case, note that we also need information on how to do memory profiling on Android.
This issue latest notification was not sent due to JIRA mail setting. Fixed now. Please check the issue for latests changes.
I added a section on monitoring allocations on Android. See https://wiki.appcelerator.org/display/guides/Managing+Memory+and+Finding+Leaks#ManagingMemoryandFindingLeaks-MonitoringallocationsonAndroid It would be great to document a way to determine what Ti components are being allocated and orphaned like you can with Instruments. Is there a way?
Since there are Titanium objects and JS objects, is there a way to monitor those two separately? Because, sometimes TiObjects can be released, but JS object can remain in memory.
I think these got lost as doc tickets, so I'm moving them over to TIMOB land.
For the memory limits on Android... The heap limits are set by the device not necessarily by the OS version. I think instead we should just document how "memory classes" work in Android. See references bellow, but to summarize the baseline size is 16MB with devices having more memory returning higher limits (ex: 24). There is also the "large" memory class that can be enabled starting in Android 3.0 (API level 11). References: - [ActivityManager.getMemoryClass()](http://developer.android.com/reference/android/app/ActivityManager.html#getMemoryClass()) - [ActivityManager.getLargeMemoryClass()](http://developer.android.com/reference/android/app/ActivityManager.html#getLargeMemoryClass())
Review done. If you require further support/comments from platform please re-open this ticket.
Closing ticket as fixed.