Question

I do not understand how Java could rely on C++ code at the times of C++ hadn't a memory model ? I mean, Java had memory model all the time ! But it's written using C++ language which hadn't one until C++11 version of the language.

How could it be possible ? Please, bring some light !

Thanks!

Was it helpful?

Solution

This is possible because Java VMs were written using non-portable knowledge of the memory models of the implementations of C++ that compiled them.

The introduction of a memory model into C++11 is useful since it provides a standard model, and so future C++ code does not need to rely on detailed knowledge of particular C++ implementations.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top