J
Jie
Hi, I have this script trying to do something for an array of files.
The script is posted at http://www.humanbee.com/CHE/MERGE.txt
As you can see, for each file in
("1","2","3","4","5","6","7","8","9"....
some processing will be carried out. Even though my Mac has 6G memory,
the program will give this following message after processing file
"4". My question is, if there is enough memory to process each one
individually, why there is not enough memory to process the array in a
loop by using "foreach". I assume within this foreach loop, when one
file is finished processing and the output file is written, the memory
will be released, to begin processing the next one. Isn't that true??
Also, for another program, when I use "foreach <IN-FILE>", it runs out
of memory. but when I change to "while<IN-FILE>", it works fine...
Strange....
=======the error message========
perl(14232) malloc: *** vm_allocate(size=1069056) failed (error
code=3)
perl(142Out of memory!32) malloc: *** error: can't allocate region
perl(14232) malloc: *** set a breakpoint in szone_error to debug
The script is posted at http://www.humanbee.com/CHE/MERGE.txt
As you can see, for each file in
("1","2","3","4","5","6","7","8","9"....
some processing will be carried out. Even though my Mac has 6G memory,
the program will give this following message after processing file
"4". My question is, if there is enough memory to process each one
individually, why there is not enough memory to process the array in a
loop by using "foreach". I assume within this foreach loop, when one
file is finished processing and the output file is written, the memory
will be released, to begin processing the next one. Isn't that true??
Also, for another program, when I use "foreach <IN-FILE>", it runs out
of memory. but when I change to "while<IN-FILE>", it works fine...
Strange....
=======the error message========
perl(14232) malloc: *** vm_allocate(size=1069056) failed (error
code=3)
perl(142Out of memory!32) malloc: *** error: can't allocate region
perl(14232) malloc: *** set a breakpoint in szone_error to debug