java-memory-model
java set max stack size
How can I set maximum stack size? I use jEdit to search with regular expression in rather big file (73 kb) and it fails with StackOverflowException.[详细]
2023-03-28 16:36 分类:问答Fence instruction insertion by JVM/JIT
Java memory model gives DRF guarantee(Data race freedom) which means that a data race free program when executed under relaxed memory model of java will give same behaviour as of sequentially consiste[详细]
2023-03-19 13:35 分类:问答java - reordering inside synchronized block
Is it possible for the reordering of statements inside a synchronized block ? For example synchronized(lock) {[详细]
2023-03-19 03:44 分类:问答Java - Immutable array thread-safety
I have a question regarding the Java Memory Model. Here is a simple class presenting the problem: public class ImmutableIntArray {[详细]
2023-03-19 02:14 分类:问答how to release memory after java programme execution
I have scheduled a jar file to run on system start up which is using mysql. it use to push thousands of records from one DB to another, during each execution it occupies lots of cpu memory but once i[详细]
2023-03-18 21:46 分类:问答volatile with release/acquire semantics
Since Java 5, the volatile keyword has release/acquire semantics to make side-effects visible to other threads (including assignments to non-volatile variables!). Take these two variables, for example[详细]
2023-03-16 02:15 分类:问答Java concurrency: is final field (initialized in constructor) thread-safe?
Can anyone tell me whether this class is threadsafe or not ? class Foo { private final Map<String,String> aMap;[详细]
2023-03-15 11:00 分类:问答What does "volatile" mean in Java?
We use volatile in one of our projects to maintain the same copy of variable accessed by different threads. My question is whether it is alright to use volatile with static. The compiler does not give[详细]
2023-02-08 02:29 分类:问答Behaviour of synchronized
I have read that code inside a synchronized block conform to \'happens before\' semantics so that all the values written inside a synchronized block should be visible to other threads in succession. F[详细]
2023-01-20 02:44 分类:问答Double-checked locking for growable array of binomial coefficients
I\'m trying to use double-checked locking to maintain an array of binomial coefficients, but I read recently that double-checked locking doesn\'t work.Efficiency is extremely important so using volati[详细]
2023-01-13 08:11 分类:问答