mnemonic-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject incubator-mnemonic git commit: MNEMONIC-268: Support to adjust the size of underlying memory capacity
Date Thu, 18 May 2017 17:30:13 GMT
Repository: incubator-mnemonic
Updated Branches:
  refs/heads/master 299a08966 -> c3f487b54


MNEMONIC-268: Support to adjust the size of underlying memory capacity


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

Branch: refs/heads/master
Commit: c3f487b54f889f1e576684690f6b9c699007f1a2
Parents: 299a089
Author: Wang, Gang(Gary) <gang1.wang@intel.com>
Authored: Wed May 17 16:32:51 2017 -0700
Committer: Wang, Gang(Gary) <gang1.wang@intel.com>
Committed: Thu May 18 10:27:21 2017 -0700

----------------------------------------------------------------------
 .../memoryservice/VolatileMemoryAllocatorService.java  | 13 +++++++++++++
 .../memoryservice/internal/PMemServiceImpl.java        |  5 +++++
 .../memoryservice/internal/VMemServiceImpl.java        |  5 +++++
 .../memoryservice/internal/PMallocServiceImpl.java     |  5 +++++
 .../memoryservice/internal/SysVMemServiceImpl.java     |  5 +++++
 5 files changed, 33 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/c3f487b5/mnemonic-core/src/main/java/org/apache/mnemonic/service/memoryservice/VolatileMemoryAllocatorService.java
----------------------------------------------------------------------
diff --git a/mnemonic-core/src/main/java/org/apache/mnemonic/service/memoryservice/VolatileMemoryAllocatorService.java
b/mnemonic-core/src/main/java/org/apache/mnemonic/service/memoryservice/VolatileMemoryAllocatorService.java
index b9994cb..178e152 100644
--- a/mnemonic-core/src/main/java/org/apache/mnemonic/service/memoryservice/VolatileMemoryAllocatorService.java
+++ b/mnemonic-core/src/main/java/org/apache/mnemonic/service/memoryservice/VolatileMemoryAllocatorService.java
@@ -135,6 +135,19 @@ public interface VolatileMemoryAllocatorService {
   long init(long capacity, String uri, boolean isnew);
 
   /**
+   * Adjust the capacity of a memory pool
+   *
+   * @param id
+   *         specify the id of underlying native allocator
+   *
+   * @param reserve
+   *         reserve certain amount of memory space in tail for use
+   *
+   * @return the new capacity
+   */
+  long adjustCapacity(long id, long reserve);
+
+  /**
    * close the memory pool through native interface.
    *
    * @param id

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/c3f487b5/mnemonic-memory-services/mnemonic-nvml-pmem-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/PMemServiceImpl.java
----------------------------------------------------------------------
diff --git a/mnemonic-memory-services/mnemonic-nvml-pmem-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/PMemServiceImpl.java
b/mnemonic-memory-services/mnemonic-nvml-pmem-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/PMemServiceImpl.java
index cfd5b38..232cd90 100644
--- a/mnemonic-memory-services/mnemonic-nvml-pmem-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/PMemServiceImpl.java
+++ b/mnemonic-memory-services/mnemonic-nvml-pmem-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/PMemServiceImpl.java
@@ -42,6 +42,11 @@ public class PMemServiceImpl implements NonVolatileMemoryAllocatorService
{
   }
 
   @Override
+  public long adjustCapacity(long id, long reserve) {
+    throw new UnsupportedOperationException("Unsupported to reduce capacity of this memory
service");
+  }
+
+  @Override
   public void close(long id) {
     nclose(id);
   }

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/c3f487b5/mnemonic-memory-services/mnemonic-nvml-vmem-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/VMemServiceImpl.java
----------------------------------------------------------------------
diff --git a/mnemonic-memory-services/mnemonic-nvml-vmem-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/VMemServiceImpl.java
b/mnemonic-memory-services/mnemonic-nvml-vmem-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/VMemServiceImpl.java
index ef941e8..b902d86 100644
--- a/mnemonic-memory-services/mnemonic-nvml-vmem-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/VMemServiceImpl.java
+++ b/mnemonic-memory-services/mnemonic-nvml-vmem-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/VMemServiceImpl.java
@@ -49,6 +49,11 @@ public class VMemServiceImpl implements VolatileMemoryAllocatorService
{
   }
 
   @Override
+  public long adjustCapacity(long id, long reserve) {
+    throw new UnsupportedOperationException("Unsupported to reduce capacity of this memory
service");
+  }
+
+  @Override
   public void close(long id) {
     nclose(id);
   }

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/c3f487b5/mnemonic-memory-services/mnemonic-pmalloc-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/PMallocServiceImpl.java
----------------------------------------------------------------------
diff --git a/mnemonic-memory-services/mnemonic-pmalloc-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/PMallocServiceImpl.java
b/mnemonic-memory-services/mnemonic-pmalloc-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/PMallocServiceImpl.java
index 6edace3..2558ac0 100644
--- a/mnemonic-memory-services/mnemonic-pmalloc-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/PMallocServiceImpl.java
+++ b/mnemonic-memory-services/mnemonic-pmalloc-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/PMallocServiceImpl.java
@@ -42,6 +42,11 @@ public class PMallocServiceImpl implements NonVolatileMemoryAllocatorService
{
   }
 
   @Override
+  public long adjustCapacity(long id, long reserve) {
+    throw new UnsupportedOperationException("Unsupported to reduce capacity of this memory
service");
+  }
+
+  @Override
   public void close(long id) {
     nclose(id);
   }

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/c3f487b5/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/SysVMemServiceImpl.java
----------------------------------------------------------------------
diff --git a/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/SysVMemServiceImpl.java
b/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/SysVMemServiceImpl.java
index ac4fe6c..c4cd1b0 100644
--- a/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/SysVMemServiceImpl.java
+++ b/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/SysVMemServiceImpl.java
@@ -49,6 +49,11 @@ public class SysVMemServiceImpl implements VolatileMemoryAllocatorService
{
   }
 
   @Override
+  public long adjustCapacity(long id, long reserve) {
+    throw new UnsupportedOperationException("Unsupported to reduce capacity of this memory
service");
+  }
+
+  @Override
   public void close(long id) {
     nclose(id);
   }


Mime
View raw message