Discussion:
MaxDirectMemorySize
Ted Yu ted_yu-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [seajug]
2014-09-23 00:56:39 UTC
Permalink
Hi,
When I specify -XX:MaxDirectMemorySize on the command line, would JVM reserve that much memory for DirectByteBuffer's ?
Meaning, is this amount of memory not accessible to heap ?

Cheers
Paul McLachlan pmclachlan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [seajug]
2014-09-23 01:49:43 UTC
Permalink
I believe at most it will reserve the address space, although I suspect
that it doesn't even do that. From memory, you can think of this flag as a
guardrail to prevent things from going nuts because there isn't an explicit
free() and the GC doesn't know about it / treat it specially: it's just a
reference and doesn't take much RAM. [you can get to a free() if you try
hard enough via reflection -- and from what I've seen, most folks
eventually need to].
Post by Ted Yu ted_yu-/***@public.gmane.org [seajug]
Hi,
When I specify -XX:MaxDirectMemorySize on the command line, would JVM
reserve that much memory for DirectByteBuffer's ?
Meaning, is this amount of memory not accessible to heap ?
Cheers
Loading...