santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wei Lu <w...@cs.indiana.edu>
Subject out of memory error
Date Mon, 18 Jul 2005 19:07:37 GMT

Just as the earilier thread mentioned, when sign a big file, the
xmlsecurity lib will throw the out of memory error. By looking the source
code, seems in XmlSignatureInput::updateOutputStream

            InputStream is = getResetableInputStream();
            if (bytes!=null) {
                //already read write it, can be rea.
            	diOs.write(bytes,0,bytes.length);
                return;
            }
            is.reset();

The plail file will be read into memory, and then caculcate the signature
over it.  Obviously it leads to a big memory allocation. Not sure why this
big-allocation-for-all is used in here, for performance? After commenting
the above code out and add

InputStream is = this._inputOctetStreamProxy;

It works well, I want to make sure whether this modification will cause
other problems or not?

wei


Mime
View raw message