What is JMM? ⚙️
We just figured out that “obvious” Java memory-related things like heap and stack memory, object allocation, object headers, the weight of different types, and garbage collectors are about Java Memory Management, not the Java Memory Model.
So, what is the Java Memory Model actually about?
In general, it’s about how memory behaves in both single-threaded and multithreading environments. The JMM answers one critical question: What values can a particular read operation observe?
This turns out to be a non-trivial question, especially in a multithreading context.
You’ll encounter concepts like data races, operation reordering during compilation to bytecode, machine code, and at the processor level, cached values, and word tearing.
The JMM also explains the necessity of synchronization, volatile variables, and happens-before relationships.
I plan to explain these concepts step by step. Follow me so you don’t miss any new videos! ✅
Смотрите видео What is JMM? ⚙️ онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь mostdevwill 19 Июнь 2024, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 474 раз и оно понравилось like людям.