Ciao a tutti,
so che trovare la soluzione a questo problema può non esser facile ma sono in cerca di suggerimenti...All interno del pimo programma ho un ciclo for contenente un metodo che esegue calcoli che richiedono qualche minuto
codice:
....
FileWriter  prntStr = new FileWriter (incremental,true);
            for (Iterator i = mapDocuments.keySet().iterator(); i.hasNext();) {
                 docId = (Long) i.next();
                 docData = (DocumentData) mapDocuments.get(docId);
                 prntStr.write(docId.toString()+'\n');
                 prntStr.flush();
                 if(docData.isWithIntersections()){
                     intersectionsCounter++;
                     imagesParsered = workOnDoc(log,docData.getDocumentId().longValue(), connection);
                     if(imagesParsered!=null) newDocumentsData.put(docId, createDocumentData(docId,imagesParsered));
                 }//if
                
            }//for
 prntStr.close();
....

Detto che il metodo "workOnDoc()" richiamato è super testato e usato da altri programmi senza problemi e che il numero di cicli dentro questo for sono circa 20.000..
Sapreste darmi qualche dritta per risolvere questo errore? Errore che si verifica all 'interno del ciclo for dopo qualche decina di cicli..

codice:
#
# An unexpected error has been detected by Java Runtime Environment:
#
# java.lang.OutOfMemoryError: requested 512000 bytes for GrET in C:\BUILD_AREA\jdk6_11\hotspot\src\share\vm\utilities\growableArray.cpp. Out of swap space?
#
#  Internal Error (allocation.inline.hpp:42), pid=3120, tid=2772
#  Error: GrET in C:\BUILD_AREA\jdk6_11\hotspot\src\share\vm\utilities\growableArray.cpp
#
# Java VM: Java HotSpot(TM) Client VM (11.0-b16 mixed mode windows-x86)
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
grazie