sunmaz has asked for the wisdom of the Perl Monks concerning the following question:
I have an array in my program that stores a large amount of data.The Devel::Size qw(total_size) package says the array's size is 15.4 GB. However, when I traverse the array in a foreach loop, writing each index to a file, adding in line breaks, the size of the file is only 2.7 GB. I do not believe this to be an issue with the Devel::Size qw(total_size) package, as I run out of memory when running my program, allocating well over 4 GB to it. How is this possible and how can it be resolved?
Thanks in advance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Bizarre Array Size Disparity
by BrowserUk (Patriarch) on May 17, 2012 at 17:19 UTC | |
by sunmaz (Novice) on May 17, 2012 at 17:26 UTC | |
by BrowserUk (Patriarch) on May 17, 2012 at 17:50 UTC | |
by sunmaz (Novice) on May 17, 2012 at 18:15 UTC | |
by BrowserUk (Patriarch) on May 17, 2012 at 18:23 UTC | |
| |
by sunmaz (Novice) on May 17, 2012 at 18:08 UTC | |
by BrowserUk (Patriarch) on May 17, 2012 at 18:12 UTC | |
| |
by sunmaz (Novice) on May 17, 2012 at 17:29 UTC |