/*
 * Copyright 2018, Yahoo! Inc. Licensed under the terms of the
 * Apache License 2.0. See LICENSE file at the project root for terms.
 */

package com.yahoo.memory;

/**
 * @author Lee Rhodes
 */
final class DefaultMemoryRequestServer implements MemoryRequestServer {

  @Override
  //By default this allocates new memory requests on the Java heap.
  public WritableMemory request(final long capacityBytes) {
    final WritableMemory wmem = WritableMemory.allocate((int)capacityBytes);
    return wmem;
  }

  @Override
  public void requestClose(final WritableMemory memToRelease, final WritableMemory newMemory) {
    //If memToRelease is direct, this must be overridden to explicitly close.
    //Otherwise, the AutoCloseable will eventually close the resource.
  }

}

@@ -192,16 +192,23 @@
 des%0A */%0A
+public 
 final cl
@@ -527,106 +527,8 @@
 ide%0A
-  public void requestClose(final WritableMemory memToRelease, final WritableMemory newMemory) %7B%0A  
   //
@@ -599,18 +599,16 @@
  close.%0A
-  
   //Othe
@@ -668,15 +668,123 @@
 source.%0A
+  public void requestClose(final WritableMemory memToRelease, final WritableMemory newMemory) %7B%0A    //no op%0A
   %7D%0A%0A%7D%0A

Make Default MRSvr public