Repository: incubator-systemml
Updated Branches:
  refs/heads/master 4b8780ed5 -> 2c32dbf54


[SYSTEMML-1032] Fix buffer pool integer overflow w/ entries >2GB

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

Branch: refs/heads/master
Commit: df9976f90ae7ddf58e0a40e999ffa968264d3a50
Parents: 4b8780e
Author: Matthias Boehm <mbo...@us.ibm.com>
Authored: Wed Oct 12 00:50:59 2016 -0700
Committer: Matthias Boehm <mbo...@us.ibm.com>
Committed: Wed Oct 12 01:02:20 2016 -0700

----------------------------------------------------------------------
 .../sysml/runtime/controlprogram/caching/ByteBuffer.java     | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/df9976f9/src/main/java/org/apache/sysml/runtime/controlprogram/caching/ByteBuffer.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/ByteBuffer.java 
b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/ByteBuffer.java
index 73d3068..166832a 100644
--- 
a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/ByteBuffer.java
+++ 
b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/ByteBuffer.java
@@ -39,13 +39,13 @@ public class ByteBuffer
        private boolean _serialized;    
        private boolean _shallow;
        private boolean _matrix;
-       private int _size;
+       private long _size;
        
        protected byte[]     _bdata = null; //sparse matrix
        protected CacheBlock _cdata = null; //dense matrix/frame
        
        public ByteBuffer( long size ) {
-               _size = (int)size;
+               _size = size;
                _serialized = false;
        }
        
@@ -66,9 +66,9 @@ public class ByteBuffer
                        {
                                //deep serialize (for compression)
                                if( CacheableData.CACHING_BUFFER_PAGECACHE )
-                                       _bdata = PageCache.getPage(_size);
+                                       _bdata = PageCache.getPage((int)_size);
                                if( _bdata==null )
-                                       _bdata = new byte[_size];
+                                       _bdata = new byte[(int)_size];
                                DataOutput dout = new CacheDataOutput(_bdata);
                                cb.write(dout);
                        }

Reply via email to