In addition to @assylias, a very good point, also keep in mind that synchronized does not reach the memory barrier by specification. The fact is that this is how it is implemented on today's typical CPU memory architectures. The specification only guarantees what happens when two threads receive the same lock.
In any case, if you do not care about the specification, but only about the realities of the real world, then why not introduce your own variable volatile and just write it whenever you need a memory barrier? It doesn't matter which volatile you write to, while we are talking about a limited set of architectures, which is implied by your idea of synchronized(new Object()) .
source share