estbn04
Messages postés7Date d'inscriptionvendredi 7 février 2003StatutMembreDernière intervention12 février 2003
-
12 févr. 2003 à 15:07
cs_GermanBoy
Messages postés1Date d'inscriptiondimanche 26 janvier 2003StatutMembreDernière intervention24 novembre 2004
-
24 nov. 2004 à 15:14
hi!
here comes my pb:
i try to make a recursive call to a method that work on a file (to count the number of characters on each line, for a parser.
it's work well;but when the file is too big, i got a java.lang.StackOverflowError.
i tried some things like different options for JVM stack size(-Xms, -Xmx, -Xss) with no results.
i also try to use a bufferOutputStream to set buffer size..no more..
i become hopeless because it's important!!
so please help me!!
estbn04
Messages postés7Date d'inscriptionvendredi 7 février 2003StatutMembreDernière intervention12 février 2003 12 févr. 2003 à 17:17
well,well,
i think that a stackerror message is due to a lack of memory and isn't concerning a cpu problem!!
i think it's a problem with the JVM stack size...
so another solution??
estbn04
Messages postés7Date d'inscriptionvendredi 7 février 2003StatutMembreDernière intervention12 février 2003 12 févr. 2003 à 17:17
well,well,
i think that a stackerror message is due to a lack of memory and isn't concerning a cpu problem!!
i think it's a problem with the JVM stack size...
so another solution??
JHelp
Messages postés261Date d'inscriptionjeudi 5 septembre 2002StatutMembreDernière intervention 6 octobre 200511 12 févr. 2003 à 18:11
How do you scan the file ?
Do you stock all the file in memory before doing thinks ?
Your operation is only count the number of characters ?
Usaly the recursive method could be transform on a non-recurcive method. Java not support a lot of recursivity, but it's not a big problem, you transform your recurcive algorithm on a non-recursive algorithm, and the job is done.
JHelp
PS : sorry if my english is bad, it's usally a french forum
Vous n’avez pas trouvé la réponse que vous recherchez ?
estbn04
Messages postés7Date d'inscriptionvendredi 7 février 2003StatutMembreDernière intervention12 février 2003 12 févr. 2003 à 18:43
c pas grave pour l'anglais moi aussi je suis français mais je croyais que le forum était international..
sinon mon problème vient finalement du système (mauvaise config = mauvaise performance...)donc mémoire syst. et Cpu trop court mais la ça va mieux !!
merci JHelp et aussi Merci à Duss qui a su tout de suite!!
estbn04
Messages postés7Date d'inscriptionvendredi 7 février 2003StatutMembreDernière intervention12 février 2003 12 févr. 2003 à 18:48
i tried a try/catch but with a bufferedoutputstream and i had the same result..
but don't worry...it's seems you were right on first solution!!i try my program on another machine and it worked perfectly, so i look deeply mine and i so that CPU and memory were bad config. for the Job..
i modified them and i hope it will work now!!!
thanks a lot for your inspiration!!!!
regards