How do I get stack memory stats programatically?
问题 I'm writing a simple memory reporting utility (in this particular situation using an existing tool is not an option). I've got it to print the max, commit and usage for all the memory pools returned by iterating ManagementFactory.getMemoryPoolMXBeans() . That gets me the three heap generations of heap memory (eden, survivor and old), the permgen, and the "code cache". None of these appear to be the method stack memory. The closest thing seems be the "code cache", but I've read that that's