title: Why is there no method to get the actual size of the stack?
body: <p>I understand that there is no way to get the stack size of a thread in Java at runtime (see <a href="https://stackoverflow.com/questions/826206/can-one-obtain-actual-stack-size-used-by-a-thread-in-java-after-some-time-of-run">Can one obtain actual stack size used by a thread in Java after some time of running?</a>).</p>
  
  <p>For example, if we create a <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html#Thread%28java.lang.ThreadGroup,%20java.lang.Runnable,%20java.lang.String,%20long%29" rel="nofollow noreferrer">java.lang.Thread</a> specifying a stack size of 64*1024, the JVM is free to give us a thread with <em>any</em> stack size.</p>
  
  <p>However, I believe that actually knowing the actual size of the stack is very useful for certain applications which requires this kind of information.</p>
  
  <p>What is the reason that we do not have a method which tells us the <em>actual</em> number of bytes used for the stack?</p>
  
  <p>Is there some kind of limitation in the architecture that makes it impossible to get the actual number of bytes for a thread?</p>