I want to know how Java runtime uses native memory? I have browsed web but couldn't find any good source to learn about the process thoroughly. Moreover, how can I tell if I'm running out of native memory? Is it even possible?
Asked
Active
Viewed 397 times
-2
-
you can refer to this question:[How to monitor Java Memory Usage?](http://stackoverflow.com/questions/1058991/how-to-monitor-java-memory-usage) – Saqib Ahmed Feb 10 '17 at 07:47
-
that is actually not what I am looking for. – Samrat Hasan Feb 10 '17 at 07:51
-
So what *are* you looking for? The only possible answer to this vague question is 'yes: the JVM uses native memory'. There is no other memory for it to use, and it uses it in whatever way it needs to. Not a real question. – user207421 Feb 10 '17 at 08:36
-
I wanted to know why and how JVM uses native memory! – Samrat Hasan Feb 10 '17 at 17:36
1 Answers
2
How java runtime uses native memory - article may answer your question. Why and how Java runtime uses native memory depends on number of factors like Java heap and garbage collection, class and classloaders, Just in time compilers, threads, JNI, NIO etc. All these things are briefly described in the mentioned article.
The same article also talk about how can you tell if you are running out of native memory, not sure whether that will answer your question! But in general, there is no one simple way to identify native-memory exhaustion. More can be found on the article.

Wasi Ahmad
- 35,739
- 32
- 114
- 161
-
Thanks for the article. I got some idea on how jvm uses memory though the article is bit tough for me to understand completely but it is well written. – Samrat Hasan Feb 10 '17 at 17:37