incubator-directmemory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Akash Ashok <thehellma...@gmail.com>
Subject Memory Deallocation Issue
Date Thu, 20 Oct 2011 07:31:26 GMT
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