[BUG?] javahl-1.3 -> streamFileContent
From: Manuel Freiholz INT <m.freiholz_at_cadenas.de>
Date: 2006-02-13 09:16:27 CET
Hope im right here for Bug reporting - i apoligize when not :)
-- In the new method 'streamFileContent' of the svn-javahl 1.3 must be a memory leak. I tried to use this method for an download over a servlet and i always get a 'Java heap space' ( BIG FILES ONLY <-important, try with files like 200MB). I discuss on forums about many ways to use this method, but not one way wors correctly. So we though there must be a leak. I think the leak is in the native file: [ SVNClient.cpp - Line 2405 ] -- while (contentSize > 0) { size_t readSize = bufSize > contentSize ? contentSize : bufSize; Err = svn_stream_read(read_stream, (char *)bufData, &readSize); if (Err != NULL) { env->ReleaseByteArrayElements(buffer, bufData, 0); svn_stream_close(read_stream); JNIUtil::handleSVNError(Err); return; } env->ReleaseByteArrayElements(buffer, bufData, JNI_COMMIT); env->CallVoidMethod(outputStream, writeMethod, buffer, 0, readSize); if (JNIUtil::isJavaExceptionThrown()) { env->ReleaseByteArrayElements(buffer, bufData, 0); svn_stream_close(read_stream); return; } contentSize -= readSize; } -- I think this must be the 'bug'. Best Regards, - Manuel --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org For additional commands, e-mail: dev-help@subversion.tigris.orgReceived on Wed Feb 15 01:32:32 2006 |
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.