mdf092
mdf092

Reputation: 35

Android App and aar Memory Management

I'm newbie to android development and just wondering how the device Memory (RAM) will be shared between an app and the included arr.

The main problem is when I call the aar in my App:

  1. is the memory of arr is same with the App?
  2. is it possible to force the aar run in different memory block?
  3. if the memory block are separated, is it possible to access the memory of aar in any other way?

for finding the answer I have read these documents without any explicit answer. https://mobworld.wordpress.com/2010/07/05/memory-management-in-android/ https://developer.android.com/training/articles/memory.html Is there a way to process sensitive data in memory securely on Android? http://elinux.org/images/e/e9/Memory_Management_Internals.pdf

Thanks for you help :)

Upvotes: 0

Views: 187

Answers (2)

F43nd1r
F43nd1r

Reputation: 7749

AAR is a build time concept. That means, everything inside the aar will be merged into your application when the apk is built. At runtime there is no concept of aars or libraries in general. As a result of that you cannot differ between app and aar memory.

Upvotes: 1

Sandro Machado
Sandro Machado

Reputation: 10215

Yes, the memory is the same since, it is the same application. The AAR is the library format, in the final APK, it looks like code you wrote. There is nothing that distinct your code from the code in the library you use.

Upvotes: 2

Related Questions