Java Memory Model

Since Java is a platform-independent language, care has to be taken when executing the same Java program on different CPU architectures. If bytecode loads and stores were simply mapped to native loads and stores, the semantics of the Java program would change between platforms, usually because some platforms impose stronger memory ordering than others.

In order to guarantee that memory operations in Java are interpreted the same way on different architectures, a Java Memory Model exists. It specifies the semantics of memory accesses in Java. When Java first came out, this model was rather broken, but was later made consistent, through the work of JSR-133.

See also JSR-133.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.45.80