Reputation: 3347
If two Android app uses a shared C library, will Android shared memory pages between them like linux? What about Java libraries? Is there any memory sharing happen at the JVM level depending how the two applications are written?
Upvotes: 1
Views: 89
Reputation: 1007286
If two Android app uses a shared C library, will Android shared memory pages between them like linux?
Libraries that are part of the firmware and are loaded via the zygote will be shared between apps, via copy-on-write memory sharing.
Libraries that two apps happen to bundle in their own apps will not be shared — on disk or in memory pages — even if they are the same library.
What about Java libraries?
Java class libraries that are part of the firmware and are loaded via the zygote will be shared between apps, via copy-on-write memory sharing.
Java class libraries that two apps happen to bundle in their own apps will not be shared — on disk or in memory pages — even if they are the same library.
Upvotes: 1