geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [03/35] incubator-geode git commit: GEODE-489: delegate in getRefCount
Date Tue, 03 Nov 2015 19:38:35 GMT
GEODE-489: delegate in getRefCount

Certains subclasses of MemoryBlock do not have a refCount.
But the MemoryBlockNode implementation was always trying to
read a refCount using the memory address of the block.
Instead it should have delegated getRefCount to the MemoryBlock
implementation.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/b6446dc9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/b6446dc9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/b6446dc9

Branch: refs/heads/develop
Commit: b6446dc91d25c5524efb212f8f5ec70e7e3cb703
Parents: 7b98798
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Mon Oct 26 11:58:35 2015 -0700
Committer: Darrel Schneider <dschneider@pivotal.io>
Committed: Mon Oct 26 11:58:35 2015 -0700

----------------------------------------------------------------------
 .../gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b6446dc9/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
index 554839d..a38daa6 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
@@ -3385,7 +3385,7 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator,
MemoryI
       return this.block.getFreeListId();
     }
     public int getRefCount() {
-      return Chunk.getRefCount(getMemoryAddress());
+      return this.block.getRefCount(); // delegate to fix GEODE-489
     }
     public String getDataType() {
       if (this.block.getDataType() != null) {


Mime
View raw message