santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raul Benito <raul.benito.gar...@gmail.com>
Subject Re: out of memory error
Date Mon, 18 Jul 2005 22:05:02 GMT
Sadly your modification only works in a restricted scenario. Only one
reference to sign for inputstream. The getReseteableInputStream()
tries to do what you are doing, but it only works with
ByteArrayInputStreams, I have try to make it work with a
FileInputStreams but a entry in bugzilla stated my faillure.
But I welcome any new try.

Regards,

Raul

On 7/18/05, Wei Lu <welu@cs.indiana.edu> wrote:
> 
> 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
> 
> 


-- 
http://r-bg.com

Mime
View raw message