/** * retrieve a durable chunk from its backed memory allocator. * * @param phandler * specify the handler of memory chunk to retrieve * * @param autoreclaim * specify whether this retrieved memory chunk can be reclaimed * automatically or not * * @param rctx * specify a reclaim context * * @return a durable chunk contains the retrieved memory chunk */ @Override public DurableChunk<VolatileMemAllocator> retrieveChunk(long phandler, boolean autoreclaim, ReclaimContext rctx) { DurableChunk<VolatileMemAllocator> ret = null; long eaddr = getEffectiveAddress(phandler); long sz = m_vmasvc.retrieveSize(m_nid, eaddr); if (sz > 0L) { ret = new DurableChunk<VolatileMemAllocator>(this, eaddr, sz); if (autoreclaim) { m_chunkcollector.register(ret, rctx); } } return ret; }
/** * retrieve a durable chunk from its backed memory allocator. * * @param phandler * specify the handler of memory chunk to retrieve * * @param autoreclaim * specify whether this retrieved memory chunk can be reclaimed * automatically or not * * @param rctx * specify a reclaim context * * @return a durable chunk contains the retrieved memory chunk */ @Override public DurableChunk<NonVolatileMemAllocator> retrieveChunk(long phandler, boolean autoreclaim, ReclaimContext rctx) { DurableChunk<NonVolatileMemAllocator> ret = null; long eaddr = getEffectiveAddress(phandler); long sz = m_nvmasvc.retrieveSize(m_nid, eaddr); if (sz > 0L) { ret = new DurableChunk<NonVolatileMemAllocator>(this, eaddr, sz); ret.setCollector(m_chunkcollector); if (autoreclaim) { m_chunkcollector.register(ret, rctx); } } return ret; }
ret = new DurableChunk<VolatileMemAllocator>(this, addr, size); ret.setCollector(m_chunkcollector); if (autoreclaim) {
ret = new DurableChunk<NonVolatileMemAllocator>(this, addr, size); ret.setCollector(m_chunkcollector); if (autoreclaim) {
mholder.clear(); mholder.destroy(); ret = new DurableChunk<VolatileMemAllocator>(this, addr, size); if (ac) { m_chunkcollector.register(ret);
mholder.clear(); mholder.destroy(); ret = new DurableChunk<NonVolatileMemAllocator>(this, addr, size); if (ac) { m_chunkcollector.register(ret);