(Perl's) GD Graph - Limit of plotted data?
Haven't had many good experiences with GD::Graph when trying to plot larger data arrays.
What i have is two arrays, one is 2mln float/integer values, the other - various length but less than 2 million. Trying to plot them on the same line graph. (i do create a 0..2000000 index array for the x axis). Everything has worked when tested for 1 million of the values.
Larger array sizes throw up:
Not a GD::Image object at /usr/local/lib/perl5/site_perl/5.8.9/GD/Graph.pm line 182
not even sure where in my script it fails - no other errors
Did not find anything in 开发者_JS百科the official documentation about memory/data limits of GD::Graph. Additional info that might help you people help me:
- my script attempts to save graphs into a file (.gif)
- pretty sure this is not due to my web server memory limit (it would show a message about killed perl process)
Thanks
Could you maybe post the code in question so we can give it an inspection and see what's up? at first guess, it does sound like a memory issue related to inability to allocate that much storage space, the allocation is returning a null pointer in the underlying system and thus Perl can't actually create the GD object, since you're trying to allocate somewhere in the range of 125MB off the heap with 2000000 64bit (assuming you're on a 64bit host) ints/floats. But, it could just be something syntactical.
精彩评论