incubator-directmemory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raffaele P. Guidi" <raffaele.p.gu...@gmail.com>
Subject Re: Memory Deallocation Issue
Date Thu, 20 Oct 2011 07:56:44 GMT
It is not casual. I didn't find a way to free a DirectBuffer except than
stopping the jvm. Please double check it, ten talented programmers are
better than a dumb one ;-)

On Thursday, October 20, 2011, Akash Ashok <thehellmaker@gmail.com> wrote:
> I currently see that we have
>
> Cache.java
> public static void clear() {
> for (OffHeapMemoryBuffer buffer : buffers) {
> buffer.clear();
> }
> activeBuffer = buffers.get(0);
> }
>
> OffHeapMemoryBuffer.java
>
> public void clear()  {
> allocationErrors = 0;
> pointers.clear();
> createAndAddFirstPointer();
> buffer.clear();
> used.set(0);
> }
>
> buffer.clear() doesn't actually deallocate the memory. I assume currently
we
> dnt have the feature of de-allocating memory which means that we can't
> resize the cache once instantiated even if we want to. I feel we should
have
> this feature  which would give deeper control on the Cache.
>
>
>
> Cheers,
> Akash A
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message