Can one obtain actual stack size used by a thread in Java after some time of running? -


This idea will help determine the optimal stack size for a given Java application.

One thing that can be done with this information creates a range-table which can modify the thread as the exit and which can be out of time and out.

Edit: This is in reference to running with real workloads on customer machines, for which I can not get access to profiler.

EDIT2: In response to an answer, IIRC 256 KB per thread, I've been surprised for a while that what is needed for it, how close it really is It is also surprising that this question is not very relevant because probably stack space has been allocated on demand). We have an application server that is based on message passing and throws and runs everything from ARM handheld to octo-core Linux, midrange and mainframes - where we can do business (and if) to feel this It would be good to have a stack of piles on the system with many message handlers.

There are some such questions which are of interest, but they are original / OS-specific:

Stack memory will be difficult to obtain.

The best you can do, and quite easily, through the JVM memory usage.


Comments