off the top of my head I would suggest you slice off the slice off the pieces 
that you have used already when pulling data from the original array. That 
way the array gets smaller as you finish modifiying its info and transferring 
it somewhere else.

BassFool


On Monday 24 May 2004 02:57 pm, Hari Krishnaan wrote:
> Hi all,
> I have question with respect to memory utilization using perl. I am reading
> a huge file close to 786432 lines of hex values & am storing in an array. I
> do a data reformatting using the data in these array & in the sequence of
> process generate a number of arrays & eventually write into a file at the
> end of the subroutine. The problem I get is in the middle of subroutine
> execution I get "Out of memory" indication & I have used close to 2 Gigs of
> memory. So inorder to avoid this Out of memory issue what I did was, after
> I send the array elements to a different array, I initialize the original
> array with null. For eg: this is what I do with one of the array,
>
> for ($init_cnt=0;$init_cnt<=$#out_array_bin;$init_cnt++) {
> $out_array_bin[$init_cnt] = "";
> }
>
> I followd the same approach with other arrays in my subroutine.
> I thought this would solve my Out of memory problem but it did not.
> Can some one tell me what could be an alternative solution for this problem
> or kindly suggest me if sometning I should need to correct in my existing
> solution.
>
> Thanks for the help in advance,
> Hari
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Friends.  Fun. Try the all-new Yahoo! Messenger

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to