diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/result/ResultReader.java b/asterix-app/src/main/java/edu/uci/ics/asterix/result/ResultReader.java
index ad21dd1..a64f350 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/result/ResultReader.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/result/ResultReader.java
@@ -14,12 +14,9 @@
  */
 package edu.uci.ics.asterix.result;
 
-import java.nio.ByteBuffer;
-
-import edu.uci.ics.asterix.common.config.AsterixCompilerProperties;
-import edu.uci.ics.asterix.common.config.GlobalConfig;
 import edu.uci.ics.asterix.om.util.AsterixAppContextInfo;
 import edu.uci.ics.hyracks.api.client.IHyracksClientConnection;
+import edu.uci.ics.hyracks.api.comm.IFrame;
 import edu.uci.ics.hyracks.api.comm.IFrameTupleAccessor;
 import edu.uci.ics.hyracks.api.dataset.DatasetJobRecord.Status;
 import edu.uci.ics.hyracks.api.dataset.IHyracksDataset;
@@ -47,15 +44,15 @@
 
     public void open(JobId jobId, ResultSetId resultSetId) throws HyracksDataException {
         reader = hyracksDataset.createReader(jobId, resultSetId);
-        frameTupleAccessor = new ResultFrameTupleAccessor(FRAME_SIZE);
+        frameTupleAccessor = new ResultFrameTupleAccessor();
     }
 
     public Status getStatus() {
         return reader.getResultStatus();
     }
 
-    public int read(ByteBuffer buffer) throws HyracksDataException {
-        return reader.read(buffer);
+    public int read(IFrame frame) throws HyracksDataException {
+        return reader.read(frame);
     }
 
     public IFrameTupleAccessor getFrameTupleAccessor() {
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/result/ResultUtils.java b/asterix-app/src/main/java/edu/uci/ics/asterix/result/ResultUtils.java
index 326697f..3a4fd5f 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/result/ResultUtils.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/result/ResultUtils.java
@@ -20,7 +20,6 @@
 import java.io.InputStreamReader;
 import java.io.PrintWriter;
 import java.io.StringWriter;
-import java.nio.ByteBuffer;
 import java.nio.charset.Charset;
 import java.util.HashMap;
 import java.util.Map;
@@ -37,8 +36,11 @@
 import edu.uci.ics.asterix.api.http.servlet.APIServlet;
 import edu.uci.ics.asterix.om.types.ARecordType;
 import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
+import edu.uci.ics.hyracks.api.comm.IFrame;
 import edu.uci.ics.hyracks.api.comm.IFrameTupleAccessor;
+import edu.uci.ics.hyracks.api.comm.VSizeFrame;
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
+import edu.uci.ics.hyracks.control.nc.resources.memory.FrameManager;
 import edu.uci.ics.hyracks.dataflow.common.comm.util.ByteBufferInputStream;
 
 public class ResultUtils {
@@ -84,13 +86,14 @@
         conf.out().print("\r\n");
     }
 
+    public static FrameManager resultDisplayFrameMgr = new FrameManager(ResultReader.FRAME_SIZE);
+
     public static void displayResults(ResultReader resultReader, SessionConfig conf)
             throws HyracksDataException {
         IFrameTupleAccessor fta = resultReader.getFrameTupleAccessor();
 
-        ByteBuffer buffer = ByteBuffer.allocate(ResultReader.FRAME_SIZE);
-        buffer.clear();
-        int bytesRead = resultReader.read(buffer);
+        IFrame frame = new VSizeFrame(resultDisplayFrameMgr);
+        int bytesRead = resultReader.read(frame);
         ByteBufferInputStream bbis = new ByteBufferInputStream();
 
         // Whether we need to separate top-level ADM instances with commas
@@ -122,13 +125,13 @@
         if (bytesRead > 0) {
             do {
                 try {
-                    fta.reset(buffer);
+                    fta.reset(frame.getBuffer());
                     int last = fta.getTupleCount();
                     String result;
                     for (int tIndex = 0; tIndex < last; tIndex++) {
                         int start = fta.getTupleStartOffset(tIndex);
                         int length = fta.getTupleEndOffset(tIndex) - start;
-                        bbis.setByteBuffer(buffer, start);
+                        bbis.setByteBuffer(frame.getBuffer(), start);
                         byte[] recordBytes = new byte[length];
                         int numread = bbis.read(recordBytes, 0, length);
                         if (conf.fmt() == OutputFormat.CSV) {
@@ -146,7 +149,7 @@
                             conf.out().print("\r\n");
                         }
                     }
-                    buffer.clear();
+                    frame.getBuffer().clear();
                 } finally {
                     try {
                         bbis.close();
@@ -154,7 +157,7 @@
                         throw new HyracksDataException(e);
                     }
                 }
-            } while (resultReader.read(buffer) > 0);
+            } while (resultReader.read(frame) > 0);
         }
 
         conf.out().flush();
diff --git a/asterix-app/src/main/java/edu/uci/ics/hyracks/dataflow/std/misc/ConstantTupleSourceOperatorNodePushable.java b/asterix-app/src/main/java/edu/uci/ics/hyracks/dataflow/std/misc/ConstantTupleSourceOperatorNodePushable.java
index 4cfb8c6..4ee37ba 100644
--- a/asterix-app/src/main/java/edu/uci/ics/hyracks/dataflow/std/misc/ConstantTupleSourceOperatorNodePushable.java
+++ b/asterix-app/src/main/java/edu/uci/ics/hyracks/dataflow/std/misc/ConstantTupleSourceOperatorNodePushable.java
@@ -15,8 +15,7 @@
 
 package edu.uci.ics.hyracks.dataflow.std.misc;
 
-import java.nio.ByteBuffer;
-
+import edu.uci.ics.hyracks.api.comm.VSizeFrame;
 import edu.uci.ics.hyracks.api.context.IHyracksTaskContext;
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
 import edu.uci.ics.hyracks.dataflow.common.comm.io.FrameTupleAppender;
@@ -41,14 +40,12 @@
 
     @Override
     public void initialize() throws HyracksDataException {
-        ByteBuffer writeBuffer = ctx.allocateFrame();
-        FrameTupleAppender appender = new FrameTupleAppender(ctx.getFrameSize());
-        appender.reset(writeBuffer, true);
+        FrameTupleAppender appender = new FrameTupleAppender(new VSizeFrame(ctx));
         if (fieldSlots != null && tupleData != null && tupleSize > 0)
             appender.append(fieldSlots, tupleData, 0, tupleSize);
         writer.open();
         try {
-            FrameUtils.flushFrame(writeBuffer, writer);
+            appender.flush(writer, true);
         }
         finally {
             writer.close();
diff --git a/asterix-app/src/main/resources/asterix-build-configuration.xml b/asterix-app/src/main/resources/asterix-build-configuration.xml
index 03f2f0e..9ac89e7 100644
--- a/asterix-app/src/main/resources/asterix-build-configuration.xml
+++ b/asterix-app/src/main/resources/asterix-build-configuration.xml
@@ -47,15 +47,15 @@
 	</property>
 	<property>
 		<name>compiler.sortmemory</name>
-		<value>98304</value>
+		<value>163840</value>
 	</property>
 	<property>
 		<name>compiler.groupmemory</name>
-		<value>98304</value>
+		<value>163840</value>
 	</property>
 	<property>
 		<name>compiler.joinmemory</name>
-		<value>131072</value>
+		<value>163840</value>
 	</property>
 	<property>
 		<name>storage.buffercache.pagesize</name>
