I am trying to quantify the difference in the memory area of a small java application executing the same process with a multi-threaded and multi-processor interface.
All my tests are under Linux.
When working with a multi-threaded protocol, it is relatively easy to determine the total size and additional overhead for a stream. When starting a single-threaded process, the JVM is large (200-300M virtual space) according to pmap. If I run several copies of the same application, I see the memory area x N, and none of the java code is shared between processes.
I was told that since Java code is bytecode and not executable, it does not pass code between processes, as it would be with the C binaries. However, I was informed that it can use Copy-On technology -Write to achieve the same. If I use pmap, it just tells me about the process trace and does not indicate how much can be transferred to another process.
So, the question is how to determine how much data is transferred through Copy-On-Write between processes?
Funbob
source share