Hi Davide,
> After a series of call of the metod "test" the
> javabridge send
> OutOfMemory errors.
I could not reproduce this problem. I've created a
class which passes a 100MB byte array to java,
retrieves it and compares the result. The algorithm
requires at least 500MB heap, but there's no memory
leak.
> The problem seem that the system don't free the
> allocated memory.
Can you please open a problem report (please use
http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233)
and attach the code to reproduce this memory leak at
the end of the ticket?
> I try also with a singleton class but the problem
> persist.
Well, if you bind your data to a class, the data will
not be released until the VM runs out of memory. This
isn't a bug but a Java feature.
> There are known problem related to passing big size
> params??
No. But note that sending large binary data is not as
efficient as you might think. XML is a ASCII protocol,
to that your byte array is 4/3 times bigger than it
needs to be.
> $data = function_that_return_a_50Mega_byteArray();
> with a memory set to 384M (-Xmx384m) the javabridge
> fill the memory
> after 3/4 calls.
50MB for the original data, +67MB+50MB (arg) +50MB
(result) + 67MB (response) = 284MB. So 384 MB heap
should be enough.
Regards,
Jost Boekemeier
__________________________________ Yahoo! Clever: Sie haben Fragen? Yahoo! Nutzer antworten Ihnen. www.yahoo.de/clever
|