Does Android follow Java Memory Model?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Does Android follow Java Memory Model?

KUAN-YING CHOU
Hi,

I'm trying to figure out whether Android follows Java Memory Model. I found an old post stating that it does on Dalvik since Android 4.0[1], but how about ART? Can we apply the rules in JMM(or other reputable resources like Java Concurrency in Practice) to modern Android development?

[1] https://stackoverflow.com/questions/4588076/is-dalviks-memory-model-the-same-as-javas

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-platform/4f404fbc-c0c3-4b01-8bb7-b2c30ab43b90n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Does Android follow Java Memory Model?

Glenn Kasten
https://developer.android.com/training/articles/smp

On Monday, October 19, 2020 at 7:56:51 AM UTC-7, KUAN-YING CHOU wrote:
Hi,

I'm trying to figure out whether Android follows Java Memory Model. I found an old post stating that it does on Dalvik since Android 4.0[1], but how about ART? Can we apply the rules in JMM(or other reputable resources like Java Concurrency in Practice) to modern Android development?

[1] <a href="https://stackoverflow.com/questions/4588076/is-dalviks-memory-model-the-same-as-javas" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F4588076%2Fis-dalviks-memory-model-the-same-as-javas\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGotUrYctNQ6aYzYowFAU5zKt6fkA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F4588076%2Fis-dalviks-memory-model-the-same-as-javas\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGotUrYctNQ6aYzYowFAU5zKt6fkA&#39;;return true;">https://stackoverflow.com/questions/4588076/is-dalviks-memory-model-the-same-as-javas

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-platform/42c47a60-fea7-483f-9065-79fe571ef214o%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Does Android follow Java Memory Model?

KUAN-YING CHOU
Thanks, but I couldn't find the answer in the linked article, which seems to be also written by fadden originally. Is it 1) Yes, we can apply JMM(JSR133) to Java the language and runtime on recent Android versions, 2) No, it's complicated, or 3) I'm asking the wrong question?

On Wednesday, October 21, 2020 at 5:26:48 PM UTC+2 Glenn Kasten wrote:


On Monday, October 19, 2020 at 7:56:51 AM UTC-7, KUAN-YING CHOU wrote:
Hi,

I'm trying to figure out whether Android follows Java Memory Model. I found an old post stating that it does on Dalvik since Android 4.0[1], but how about ART? Can we apply the rules in JMM(or other reputable resources like Java Concurrency in Practice) to modern Android development?

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-platform/04800092-c8d1-4bd8-9175-a4727ce234c6n%40googlegroups.com.