I've rewritten to code to prevent the problem, but what was happening was that if ImageMagick could not ping the image (that is, get its width), the script would cause the window's server memory usage to increase to over 800MB in less than a second. I looked in the task manager and found that the perl.exe process was using only around 20MB! Again, I rewrote the code to check on $image_x, but was wondering why so much memory would be allocated so quickly for an undefined variable problem and where that memory might have gone. Again, looking through the process list showed only a total of maybe 100MB memory useage. Any ideas? Thanksmy $Absolute_URL = "$gallerycfg{'UPLOAD'}/$imgparams{username}/$im +gparams{PicID}.jpg"; my $image = new Image::Magick; my ($image_x,$image_y) = $image->Ping($Absolute_URL); #Set to a high number for error trapping $imgparams{THREED}=5; #Determine if image is 3D based on width if ($image_x>$gallerycfg{'3DWIDTH'}){$imgparams{THREED}=1; }else{$imgparams{THREED}=0;} #Makes sure we got information on this picture. unless ($imgparams{THREED}<2){ &writelog ("Error blah blah $Absolute_URL.",1); &dieerr("The image blah blah inconvenience."); }
In reply to Undefined value in gt (>) -> 800MB memory usage by lpoht
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |