Re: Off-heap caching through ByteBuffer.allocateDirect when JNA not available ?

2011-11-14 Thread Jonathan Ellis
Additionally, you have the barely-documented but nasty behavior of Hotspot forcing full GCs when allocateDirect reaches -XX:MaxDirectMemorySize. On Sun, Nov 13, 2011 at 2:09 PM, Peter Schuller peter.schul...@infidyne.com wrote: I would like to know it also - actually is should be similar, plus

Re: Off-heap caching through ByteBuffer.allocateDirect when JNA not available ?

2011-11-13 Thread Peter Schuller
I would like to know it also - actually is should be similar, plus there are no dependencies to sun.misc packages. I don't remember the discussion, but I assume the reason is that allocateDirect() is not freeable except by waiting for soft ref counting. This is enforced by the API in order to

Re: Off-heap caching through ByteBuffer.allocateDirect when JNA not available ?

2011-11-10 Thread Benoit Perroud
Thanks for the answer. I saw the move to sun.misc. In what sense allocateDirect is broken ? Thanks, Benoit. 2011/11/9 Jonathan Ellis jbel...@gmail.com: allocateDirect is broken for this purpose, but we removed the JNA dependency using sun.misc.Unsafe instead:

Re: Off-heap caching through ByteBuffer.allocateDirect when JNA not available ?

2011-11-10 Thread Maciej Miklas
I would like to know it also - actually is should be similar, plus there are no dependencies to sun.misc packages. Regards, Maciej On Thu, Nov 10, 2011 at 1:46 PM, Benoit Perroud ben...@noisette.ch wrote: Thanks for the answer. I saw the move to sun.misc. In what sense allocateDirect is

Off-heap caching through ByteBuffer.allocateDirect when JNA not available ?

2011-11-09 Thread Benoit Perroud
Hi, I wonder if you have already discussed about ByteBuffer.allocateDirect alternative to JNA memory allocation ? If so, do someone mind send me a pointer ? Thanks ! Benoit.

Re: Off-heap caching through ByteBuffer.allocateDirect when JNA not available ?

2011-11-09 Thread Jonathan Ellis
allocateDirect is broken for this purpose, but we removed the JNA dependency using sun.misc.Unsafe instead: https://issues.apache.org/jira/browse/CASSANDRA-3271 On Wed, Nov 9, 2011 at 5:54 AM, Benoit Perroud ben...@noisette.ch wrote: Hi, I wonder if you have already discussed about