cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <>
Subject Re: Off-heap caching through ByteBuffer.allocateDirect when JNA not available ?
Date Mon, 14 Nov 2011 17:57:33 GMT
Additionally, you have the barely-documented but nasty behavior of
Hotspot forcing full GCs when allocateDirect reaches

On Sun, Nov 13, 2011 at 2:09 PM, Peter Schuller
<> wrote:
>> 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 enable safe use of
> allocated memory without it being possible to use to break out of the
> JVM sandbox.
> JNA or misc.unsafe allows explicit freeing (at the cost of application
> bugs maybe segfaulting the JVM or causing other side-effects; i.e.,
> breaking out of the managed runtime sandbox).
> --
> / Peter Schuller (@scode,

Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support

View raw message