I am curious to know how java stack threads are managed. Since there is one stack per thread that allocated on a segment of memory specifically requested from the operating system (see Here).
- When this memory is released? by garbage collector or by native thread?
- How java process signals to the OS that this memory segment isn't used any more?
- How this memory affected is the thread was terminated but his corresponding object still has references from other live object?