Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E4BFE200D19 for ; Fri, 6 Oct 2017 21:27:57 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E32101609E1; Fri, 6 Oct 2017 19:27:57 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8B8591609D0 for ; Fri, 6 Oct 2017 21:27:56 +0200 (CEST) Received: (qmail 42770 invoked by uid 500); 6 Oct 2017 19:27:55 -0000 Mailing-List: contact commits-help@mnemonic.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mnemonic.incubator.apache.org Delivered-To: mailing list commits@mnemonic.incubator.apache.org Received: (qmail 42755 invoked by uid 99); 6 Oct 2017 19:27:55 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Oct 2017 19:27:55 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id E9228C475E for ; Fri, 6 Oct 2017 19:27:54 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.222 X-Spam-Level: X-Spam-Status: No, score=-4.222 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id EvdcUgsTxzRQ for ; Fri, 6 Oct 2017 19:27:52 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id D87EC5FD84 for ; Fri, 6 Oct 2017 19:27:51 +0000 (UTC) Received: (qmail 42590 invoked by uid 99); 6 Oct 2017 19:27:51 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Oct 2017 19:27:51 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 54133F5CF7; Fri, 6 Oct 2017 19:27:51 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: garyw@apache.org To: commits@mnemonic.incubator.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: incubator-mnemonic git commit: MNEMONIC-383: Add missing reclaim context parameters to allocators Date: Fri, 6 Oct 2017 19:27:51 +0000 (UTC) archived-at: Fri, 06 Oct 2017 19:27:58 -0000 Repository: incubator-mnemonic Updated Branches: refs/heads/master e93965705 -> 70a9c0f46 MNEMONIC-383: Add missing reclaim context parameters to allocators Project: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/commit/70a9c0f4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/tree/70a9c0f4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/diff/70a9c0f4 Branch: refs/heads/master Commit: 70a9c0f46594f7ea02cbf2198f10dff9b8706dd7 Parents: e939657 Author: Wang, Gang(Gary) Authored: Fri Oct 6 11:44:34 2017 -0700 Committer: Wang, Gang(Gary) Committed: Fri Oct 6 11:44:34 2017 -0700 ---------------------------------------------------------------------- .../java/org/apache/mnemonic/Allocatable.java | 44 ++++++- .../org/apache/mnemonic/CommonAllocator.java | 36 +++++- .../java/org/apache/mnemonic/DurableBuffer.java | 2 +- .../java/org/apache/mnemonic/DurableChunk.java | 2 +- .../mnemonic/NonVolatileMemAllocator.java | 36 ++++-- .../apache/mnemonic/RetrievableAllocator.java | 116 +++++++++++++++---- .../org/apache/mnemonic/SysMemAllocator.java | 18 ++- .../apache/mnemonic/VolatileMemAllocator.java | 36 ++++-- 8 files changed, 235 insertions(+), 55 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/70a9c0f4/mnemonic-core/src/main/java/org/apache/mnemonic/Allocatable.java ---------------------------------------------------------------------- diff --git a/mnemonic-core/src/main/java/org/apache/mnemonic/Allocatable.java b/mnemonic-core/src/main/java/org/apache/mnemonic/Allocatable.java index 9b81c2d..3ea7093 100644 --- a/mnemonic-core/src/main/java/org/apache/mnemonic/Allocatable.java +++ b/mnemonic-core/src/main/java/org/apache/mnemonic/Allocatable.java @@ -30,10 +30,20 @@ public interface Allocatable> { /** * create a memory chunk that is managed by its holder. - * + * * @param size * specify the size of memory chunk - * + * + * @return a holder contains a memory chunk + */ + MemChunkHolder createChunk(long size); + + /** + * create a memory chunk that is managed by its holder. + * + * @param size + * specify the size of memory chunk + * * @param autoreclaim * specify whether or not to reclaim this chunk automatically * @@ -47,16 +57,32 @@ public interface Allocatable> { * @param size * specify the size of memory chunk * + * @param autoreclaim + * specify whether or not to reclaim this chunk automatically + * + * @param rctx + * specify a reclaim context + * * @return a holder contains a memory chunk */ - MemChunkHolder createChunk(long size); + MemChunkHolder createChunk(long size, boolean autoreclaim, ReclaimContext rctx); /** * create a memory buffer that is managed by its holder. - * + * * @param size * specify the size of memory buffer - * + * + * @return a holder contains a memory buffer + */ + MemBufferHolder createBuffer(long size); + + /** + * create a memory buffer that is managed by its holder. + * + * @param size + * specify the size of memory buffer + * * @param autoreclaim * specify whether or not to reclaim this buffer automatically * @@ -70,9 +96,15 @@ public interface Allocatable> { * @param size * specify the size of memory buffer * + * @param autoreclaim + * specify whether or not to reclaim this buffer automatically + * + * @param rctx + * specify a reclaim context + * * @return a holder contains a memory buffer */ - MemBufferHolder createBuffer(long size); + MemBufferHolder createBuffer(long size, boolean autoreclaim, ReclaimContext rctx); /** * register a memory chunk for auto-reclaim http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/70a9c0f4/mnemonic-core/src/main/java/org/apache/mnemonic/CommonAllocator.java ---------------------------------------------------------------------- diff --git a/mnemonic-core/src/main/java/org/apache/mnemonic/CommonAllocator.java b/mnemonic-core/src/main/java/org/apache/mnemonic/CommonAllocator.java index fed34d5..5325d86 100644 --- a/mnemonic-core/src/main/java/org/apache/mnemonic/CommonAllocator.java +++ b/mnemonic-core/src/main/java/org/apache/mnemonic/CommonAllocator.java @@ -88,11 +88,27 @@ public abstract class CommonAllocator> implements A } /** + * create a memory chunk that is managed by its holder. + * + * @param size + * specify the size of memory chunk + * + * @param autoreclaim + * specify whether or not to reclaim this chunk automatically + * + * @return a holder contains a memory chunk + */ + @Override + public MemChunkHolder createChunk(long size, boolean autoreclaim) { + return createChunk(size, autoreclaim, null); + } + + /** * create a memory buffer that is managed by its holder. - * + * * @param size * specify the size of memory buffer - * + * * @return a holder contains a memory buffer */ @Override @@ -101,6 +117,22 @@ public abstract class CommonAllocator> implements A } /** + * create a memory buffer that is managed by its holder. + * + * @param size + * specify the size of memory buffer + * + * @param autoreclaim + * specify whether or not to reclaim this chunk automatically + * + * @return a holder contains a memory buffer + */ + @Override + public MemBufferHolder createBuffer(long size, boolean autoreclaim) { + return createBuffer(size, autoreclaim, null); + } + + /** * register a memory chunk for auto-reclaim * * @param mholder http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/70a9c0f4/mnemonic-core/src/main/java/org/apache/mnemonic/DurableBuffer.java ---------------------------------------------------------------------- diff --git a/mnemonic-core/src/main/java/org/apache/mnemonic/DurableBuffer.java b/mnemonic-core/src/main/java/org/apache/mnemonic/DurableBuffer.java index 8542a4e..dd2e0ee 100644 --- a/mnemonic-core/src/main/java/org/apache/mnemonic/DurableBuffer.java +++ b/mnemonic-core/src/main/java/org/apache/mnemonic/DurableBuffer.java @@ -45,7 +45,7 @@ public class DurableBuffer> extends MemBufferH @Override public void registerAutoReclaim(ReclaimContext rctx) { - registerAutoReclaim(rctx); + super.registerAutoReclaim(rctx); } @Override http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/70a9c0f4/mnemonic-core/src/main/java/org/apache/mnemonic/DurableChunk.java ---------------------------------------------------------------------- diff --git a/mnemonic-core/src/main/java/org/apache/mnemonic/DurableChunk.java b/mnemonic-core/src/main/java/org/apache/mnemonic/DurableChunk.java index f80b481..e66c8a5 100644 --- a/mnemonic-core/src/main/java/org/apache/mnemonic/DurableChunk.java +++ b/mnemonic-core/src/main/java/org/apache/mnemonic/DurableChunk.java @@ -43,7 +43,7 @@ public class DurableChunk> extends MemChunkHol @Override public void registerAutoReclaim(ReclaimContext rctx) { - registerAutoReclaim(rctx); + super.registerAutoReclaim(rctx); } @Override http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/70a9c0f4/mnemonic-core/src/main/java/org/apache/mnemonic/NonVolatileMemAllocator.java ---------------------------------------------------------------------- diff --git a/mnemonic-core/src/main/java/org/apache/mnemonic/NonVolatileMemAllocator.java b/mnemonic-core/src/main/java/org/apache/mnemonic/NonVolatileMemAllocator.java index c00b0f3..8d8f7bc 100644 --- a/mnemonic-core/src/main/java/org/apache/mnemonic/NonVolatileMemAllocator.java +++ b/mnemonic-core/src/main/java/org/apache/mnemonic/NonVolatileMemAllocator.java @@ -253,10 +253,14 @@ public class NonVolatileMemAllocator extends RestorableAllocator createChunk(long size, boolean autoreclaim) { + public DurableChunk createChunk(long size, boolean autoreclaim, + ReclaimContext rctx) { DurableChunk ret = null; Long addr = m_nvmasvc.allocate(m_nid, size, true); if ((null == addr || 0 == addr) && m_activegc) { @@ -267,7 +271,7 @@ public class NonVolatileMemAllocator extends RestorableAllocator(this, addr, size); ret.setCollector(m_chunkcollector); if (autoreclaim) { - m_chunkcollector.register(ret); + m_chunkcollector.register(ret, rctx); } } return ret; @@ -282,10 +286,14 @@ public class NonVolatileMemAllocator extends RestorableAllocator createBuffer(long size, boolean autoreclaim) { + public DurableBuffer createBuffer(long size, boolean autoreclaim, + ReclaimContext rctx) { DurableBuffer ret = null; ByteBuffer bb = m_nvmasvc.createByteBuffer(m_nid, size); if (null == bb && m_activegc) { @@ -296,7 +304,7 @@ public class NonVolatileMemAllocator extends RestorableAllocator(this, bb); ret.setCollector(m_bufcollector); if (autoreclaim) { - m_bufcollector.register(ret); + m_bufcollector.register(ret, rctx); } } return ret; @@ -311,18 +319,22 @@ public class NonVolatileMemAllocator extends RestorableAllocator retrieveBuffer(long phandler, boolean autoreclaim) { + public DurableBuffer retrieveBuffer(long phandler, boolean autoreclaim, + ReclaimContext rctx) { DurableBuffer ret = null; ByteBuffer bb = m_nvmasvc.retrieveByteBuffer(m_nid, getEffectiveAddress(phandler)); if (null != bb) { ret = new DurableBuffer(this, bb); ret.setCollector(m_bufcollector); if (autoreclaim) { - m_bufcollector.register(ret); + m_bufcollector.register(ret, rctx); } } return ret; @@ -337,11 +349,15 @@ public class NonVolatileMemAllocator extends RestorableAllocator retrieveChunk(long phandler, boolean autoreclaim) { + public DurableChunk retrieveChunk(long phandler, boolean autoreclaim, + ReclaimContext rctx) { DurableChunk ret = null; long eaddr = getEffectiveAddress(phandler); long sz = m_nvmasvc.retrieveSize(m_nid, eaddr); @@ -349,7 +365,7 @@ public class NonVolatileMemAllocator extends RestorableAllocator(this, eaddr, sz); ret.setCollector(m_chunkcollector); if (autoreclaim) { - m_chunkcollector.register(ret); + m_chunkcollector.register(ret, rctx); } } return ret; http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/70a9c0f4/mnemonic-core/src/main/java/org/apache/mnemonic/RetrievableAllocator.java ---------------------------------------------------------------------- diff --git a/mnemonic-core/src/main/java/org/apache/mnemonic/RetrievableAllocator.java b/mnemonic-core/src/main/java/org/apache/mnemonic/RetrievableAllocator.java index f24843f..fd30dc4 100644 --- a/mnemonic-core/src/main/java/org/apache/mnemonic/RetrievableAllocator.java +++ b/mnemonic-core/src/main/java/org/apache/mnemonic/RetrievableAllocator.java @@ -17,6 +17,10 @@ package org.apache.mnemonic; +import org.flowcomputing.commons.resgc.ReclaimContext; + +import java.nio.ByteBuffer; + public abstract class RetrievableAllocator> extends CommonAllocator implements AddressTranslator, HandlerStore, Transaction { @@ -26,53 +30,87 @@ public abstract class RetrievableAllocator> ex * @param size * specify the size of memory chunk * + * @return a durable chunk contains a memory chunk + */ + public DurableChunk createChunk(long size) { + return createChunk(size, true); + } + + /** + * create a durable chunk that is managed by its holder. + * + * @param size + * specify the size of memory chunk + * * @param autoreclaim * specify whether or not to reclaim this chunk automatically * * @return a durable chunk contains a memory chunk */ + public DurableChunk createChunk(long size, boolean autoreclaim) { + return createChunk(size, autoreclaim, null); + } + + /** + * create a durable chunk that is managed by its holder. + * + * @param size + * specify the size of memory chunk + * + * @param autoreclaim + * specify whether or not to reclaim this chunk automatically + * + * @param rctx + * specify a reclaim context + * + * @return a durable chunk contains a memory chunk + */ @Override - public abstract DurableChunk createChunk(long size, boolean autoreclaim); + public abstract DurableChunk createChunk(long size, boolean autoreclaim, ReclaimContext rctx); /** * create a durable buffer that is managed by its holder. - * + * * @param size * specify the size of memory buffer - * - * @param autoreclaim - * specify whether or not to reclaim this buffer automatically * * @return a durable buffer contains a memory buffer */ - @Override - public abstract DurableBuffer createBuffer(long size, boolean autoreclaim); + public DurableBuffer createBuffer(long size) { + return createBuffer(size, true); + } /** - * create a durable chunk that is managed by its holder. + * create a durable buffer that is managed by its holder. * * @param size - * specify the size of memory chunk + * specify the size of memory buffer * - * @return a durable chunk contains a memory chunk + * @param autoreclaim + * specify whether or not to reclaim this buffer automatically + * + * @return a durable buffer contains a memory buffer */ - @Override - public DurableChunk createChunk(long size) { - return createChunk(size, true); + public DurableBuffer createBuffer(long size, boolean autoreclaim) { + return createBuffer(size, autoreclaim, null); } /** * create a durable buffer that is managed by its holder. - * + * * @param size * specify the size of memory buffer - * + * + * @param autoreclaim + * specify whether or not to reclaim this buffer automatically + * + * @param rctx + * specify a reclaim context + * * @return a durable buffer contains a memory buffer */ @Override - public DurableBuffer createBuffer(long size) { - return createBuffer(size, true); - } + public abstract DurableBuffer createBuffer(long size, boolean autoreclaim, ReclaimContext rctx); /** * retrieve a memory buffer from its backed memory allocator. @@ -110,7 +148,9 @@ public abstract class RetrievableAllocator> ex * * @return a durable buffer contains the retrieved memory buffer */ - public abstract DurableBuffer retrieveBuffer(long phandler, boolean autoreclaim); + public DurableBuffer retrieveBuffer(long phandler, boolean autoreclaim) { + return retrieveBuffer(phandler, autoreclaim, null); + } /** * retrieve a memory chunk from its backed memory allocator. @@ -124,7 +164,43 @@ public abstract class RetrievableAllocator> ex * * @return a durable chunk contains the retrieved memory chunk */ - public abstract DurableChunk retrieveChunk(long phandler, boolean autoreclaim); + public DurableChunk retrieveChunk(long phandler, boolean autoreclaim) { + return retrieveChunk(phandler, autoreclaim, null); + } + + /** + * retrieve a memory buffer from its backed memory allocator. + * + * @param phandler + * specify the handler of memory buffer to retrieve + * + * @param autoreclaim + * specify whether this retrieved memory buffer can be reclaimed + * automatically or not + * + * @param rctx + * specify a reclaim context + * + * @return a durable buffer contains the retrieved memory buffer + */ + public abstract DurableBuffer retrieveBuffer(long phandler, boolean autoreclaim, ReclaimContext rctx); + + /** + * retrieve a memory 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 + */ + public abstract DurableChunk retrieveChunk(long phandler, boolean autoreclaim, ReclaimContext rctx); /** * re-size a specified chunk on its backed memory pool. http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/70a9c0f4/mnemonic-core/src/main/java/org/apache/mnemonic/SysMemAllocator.java ---------------------------------------------------------------------- diff --git a/mnemonic-core/src/main/java/org/apache/mnemonic/SysMemAllocator.java b/mnemonic-core/src/main/java/org/apache/mnemonic/SysMemAllocator.java index 2867cf3..827b704 100644 --- a/mnemonic-core/src/main/java/org/apache/mnemonic/SysMemAllocator.java +++ b/mnemonic-core/src/main/java/org/apache/mnemonic/SysMemAllocator.java @@ -282,10 +282,14 @@ public class SysMemAllocator extends CommonAllocator { * @param autoreclaim * specify whether or not to reclaim this chunk automatically * + * @param rctx + * specify a reclaim context + * * @return a holder contains a memory chunk */ @Override - public MemChunkHolder createChunk(long size, boolean autoreclaim) { + public MemChunkHolder createChunk(long size, boolean autoreclaim, + ReclaimContext rctx) { MemChunkHolder ret = null; Long addr = null; if (currentMemory.get() + size > maxStoreCapacity) { @@ -300,7 +304,7 @@ public class SysMemAllocator extends CommonAllocator { ret = new MemChunkHolder(this, addr, size); ret.setCollector(m_chunkcollector); if (autoreclaim) { - m_chunkcollector.register(ret); + m_chunkcollector.register(ret, rctx); } m_chunksize.put(addr, size); currentMemory.getAndAdd(size); @@ -313,11 +317,15 @@ public class SysMemAllocator extends CommonAllocator { * * @param size * specify the size of memory buffer - * + * + * @param rctx + * specify a reclaim context + * * @return a holder contains a memory buffer */ @Override - public MemBufferHolder createBuffer(long size, boolean autoreclaim) { + public MemBufferHolder createBuffer(long size, boolean autoreclaim, + ReclaimContext rctx) { MemBufferHolder ret = null; ByteBuffer bb = null; if (currentMemory.get() + size > maxStoreCapacity) { @@ -332,7 +340,7 @@ public class SysMemAllocator extends CommonAllocator { ret = new MemBufferHolder(this, bb); ret.setCollector(m_bufcollector); if (autoreclaim) { - m_bufcollector.register(ret); + m_bufcollector.register(ret, rctx); } currentMemory.getAndAdd(size); } http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/70a9c0f4/mnemonic-core/src/main/java/org/apache/mnemonic/VolatileMemAllocator.java ---------------------------------------------------------------------- diff --git a/mnemonic-core/src/main/java/org/apache/mnemonic/VolatileMemAllocator.java b/mnemonic-core/src/main/java/org/apache/mnemonic/VolatileMemAllocator.java index fde82b1..b54dfad 100644 --- a/mnemonic-core/src/main/java/org/apache/mnemonic/VolatileMemAllocator.java +++ b/mnemonic-core/src/main/java/org/apache/mnemonic/VolatileMemAllocator.java @@ -256,10 +256,14 @@ public class VolatileMemAllocator extends RestorableAllocator createChunk(long size, boolean autoreclaim) { + public DurableChunk createChunk(long size, boolean autoreclaim, + ReclaimContext rctx) { DurableChunk ret = null; Long addr = m_vmasvc.allocate(m_nid, size, true); if (0 == addr && m_activegc) { @@ -270,7 +274,7 @@ public class VolatileMemAllocator extends RestorableAllocator(this, addr, size); ret.setCollector(m_chunkcollector); if (autoreclaim) { - m_chunkcollector.register(ret); + m_chunkcollector.register(ret, rctx); } } return ret; @@ -285,10 +289,14 @@ public class VolatileMemAllocator extends RestorableAllocator createBuffer(long size, boolean autoreclaim) { + public DurableBuffer createBuffer(long size, boolean autoreclaim, + ReclaimContext rctx) { DurableBuffer ret = null; ByteBuffer bb = m_vmasvc.createByteBuffer(m_nid, size); if (null == bb && m_activegc) { @@ -299,7 +307,7 @@ public class VolatileMemAllocator extends RestorableAllocator(this, bb); ret.setCollector(m_bufcollector); if (autoreclaim) { - m_bufcollector.register(ret); + m_bufcollector.register(ret, rctx); } } return ret; @@ -314,17 +322,21 @@ public class VolatileMemAllocator extends RestorableAllocator retrieveBuffer(long phandler, boolean autoreclaim) { + public DurableBuffer retrieveBuffer(long phandler, boolean autoreclaim, + ReclaimContext rctx) { DurableBuffer ret = null; ByteBuffer bb = m_vmasvc.retrieveByteBuffer(m_nid, getEffectiveAddress(phandler)); if (null != bb) { ret = new DurableBuffer(this, bb); if (autoreclaim) { - m_bufcollector.register(ret); + m_bufcollector.register(ret, rctx); } } return ret; @@ -339,18 +351,22 @@ public class VolatileMemAllocator extends RestorableAllocator retrieveChunk(long phandler, boolean autoreclaim) { + public DurableChunk retrieveChunk(long phandler, boolean autoreclaim, + ReclaimContext rctx) { DurableChunk ret = null; long eaddr = getEffectiveAddress(phandler); long sz = m_vmasvc.retrieveSize(m_nid, eaddr); if (sz > 0L) { ret = new DurableChunk(this, eaddr, sz); if (autoreclaim) { - m_chunkcollector.register(ret); + m_chunkcollector.register(ret, rctx); } } return ret;