Re: Out of memory error
Thomas Chenot <tom.chenot-6tN4nzCoH/[email protected]>
| Newsgroups | gmane.comp.hardware.microcontrollers.tini |
|---|---|
| Message-ID | <[email protected]> |
Erio Magnoni wrote:
>Hi everyone!
>
>I have some problems writing on a file..after some time a
>java.lang.OutOfMemoryError is thrown such as follows:
>
>java.lang.OutOfMemoryError
> in java.io.OutputStreamWriter.<init><@JPC=110025>
> in java.io.FileWriter.<init><@JPC=160008>
> in Misura.Scrivifile<@JPC=a005c>
> in java.lang.system.???
>
>BufferedWriter out = new BufferedWriter(new FileWriter("data.txt", true));
>
I see you have set the append flag to true. What are you doing to
control the ultimate file size? Eventually the file will consume the
entire heap if it is not limited in size.
--
Thomas Chenot
_______________________________________________
TINI mailing list
TINI-6tN4nzCoH/[email protected]
To UNSUBSCRIBE, edit your profile, or see list archives:
http://lists.dalsemi.com/mailman/listinfo/tini