How much memory does my java thread take?
Solution 1:
Java threads use the heap as shared memory. Individual threads have their stack (the size of which you can set via the -Xss
command line option, default is 512KB), but all other memory (the heap) does not belong to specific threads, and asking how much of it one specific thread uses simply does not make sense.