There's also a sneaky workaround I found involving the inbuilt
java.lang.System object. I wrote a blog article about it here (a bit
waffly, but you can just skip straight to the code at the bottom!) :
http://instantbadger.blogspot.com/2004_06_01_instantbadger_archive.html#
108798595159007922
Hope that helps,
Alistair
------------------------------------------
HEADSHIFT >> www.headshift.com <blocked::http://www.headshift.com/>
T: 020 7357 7358
------------------------------------------
smarter > simpler > social >
_____
From: Dick Applebaum [mailto:[EMAIL PROTECTED]
Sent: 19 June 2004 00:12
To: CF-Talk
Subject: java.lang.OutOfMemoryError
I am program-parsing a large XML file -- my iTunes library:
3,9 Meg
85,000 lines
3,500 tracks
20 Playlists
1 Library Playlist containing all the tracks.
A big file
When I tried doing this with CFMX XML functions, everything was in
memory and I got the"
"java.lang.OutOfMemoryError"
With the help of Joe Rinehart I put together a Java object to read the
XML file, line by line.
[EMAIL PROTECTED]
I parse each line and:
1) Build a structure of structures of track info:
TrackID
--- Title
--- Artist
--- File Path
2) Build a Structuer of structures of structures of structures of
Playlist info
PlayListID
---Name
---Tracks
------TrackNumber
---------TrackID
------------ Title
------------ Artist
------------ File Path
as I create each track in the playlist, I populate it with the info
from the tracks structure.
This all goes well and I am left with 2 big structures in memory.
For debugging purposes, I decided to cfdump both structures.
Strange thing happens:
the program completes and displays the track structure (the first
cfdump)
about half through the playlist structure the display stops and I get:
java.lang.OutOfMemoryError
I can change the program so that it just does either one cfdump or the
other and it runs fine.
so, I added a cfflusg between the 2 cfdumps and it runs fine.
My questions:
What is causing the out of memory error?
Is there a memory limit to CF tags such as cfdump, cfhttp, cffile, etc?
if so what is it.
Can/should I change JVM settings to alleviate this?
TIA
Dick
_____
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
- java.lang.OutOfMemoryError Rick Jones
- Re: java.lang.OutOfMemoryError Jon Hall
- Re: java.lang.OutOfMemoryError Brook Davies
- Re: java.lang.OutOfMemoryError [Jrockit] Jon Hall
- RE: java.lang.OutOfMemoryError Dave Watts
- RE: java.lang.OutOfMemoryError Alistair Davidson
- RE: java.lang.OutOfMemoryError Alistair Davidson