Tomas Klinkovsky wrote:
> 
>> this may be caused by XXE's own code which is not written to ease
>> the job of the garbage-collector.
> 
> This can mean many things ;-)
> 
>> Therefore the solution is simply, one more time, to double the amount of
>> memory made available to Java (256Mb --> 512Mb).
>> PS: Who cares? It is just 512Mb of *virtual* memory, which is not going
>> to be used when you'll work on normal documents.
> 
> Does this "solve" the problem or just "postpone" it? I mean, having
> 512MB configured, can I re-open my document any number of times, or we
> simply increase this number of successful subsequent openings from 1 to
> 2, for example?
> 

No, to my knowledge, XXE code does not *leak* memory. However, by
design, most of its commands (insert, convert, etc) keep references to
the last active document, no matter whether this document has been
closed or not.

Therefore I would say that increasing the amount of memory solves the
problem.

I would even suggest to do a simple calculation knowing that you need 32
bits per image pixel (no matter the color model of the image) and that
you need twice the amount of memory computed this way.

Why twice the amount of memory? Because, at document open time (to make
it simple), XXE holds references, not only to the document being opened,
but also to the previously closed one.



---
PS: 750 BW JPG photos, 300x450 pixels ==> 750*450*300*4=405,000,000bytes
or ~395507Kb or ~386Mb ==> you should directly specify 1Gb for the
Java[tm] memory!

Reply via email to