Sponsored Content
Top Forums Shell Programming and Scripting Perl - FileHandles that crash memory Post 302168941 by HPAVC on Tuesday 19th of February 2008 09:47:20 PM
Old 02-19-2008
Likely this is the <b>ulimit</b> or actual kernel resource rather than perl.

You can easily create a while loop that { push @foo, rand(); } and run out of memory. Testing for memory used is sort of tricky depending on perspective, but perlmonks has plenty of threads on it.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Weakness in Perl CGI causes memory dump ??

I have discovered a curious phenomenon in GCI. I need some advice from someone far more adept. Is this a bug or potential security weakness? Context: Redhat 8.0 on xx86 (pentium 3) Apache 2.0, Perl 5.80 Background: I've been trying to harden a web application which accepts user uploaded... (0 Replies)
Discussion started by: andyj
0 Replies

2. Shell Programming and Scripting

Out of memory in PERL

I dont know whether this is a common error but it seems my PERL program is running out of buffer memory. Inside a loop I am processing an array (reading elements and displaying in it--note: for every iteration of the loop the WHOLE array is being scanned once--...the array was created by reading a... (5 Replies)
Discussion started by: Abhishek Ghose
5 Replies

3. UNIX for Dummies Questions & Answers

perl memory leak detector

Could somebody give links for memory detector for perl? Thanks :) (4 Replies)
Discussion started by: matrixmadhan
4 Replies

4. Programming

Process crash when allocating memory

Hi I'm currently using C++ on a HP-UX 11i system (upgrading some libraries) and am encountering a problem with the process crashing when allocating memory via a call to new (a rather large array of objects are being created). Is there a way to find out what the sizes of the stack and heap are?... (1 Reply)
Discussion started by: themezzaman
1 Replies

5. Shell Programming and Scripting

bash/perl script that will use up all memory

Hi, Is there any known trick that will consume all of my memory and force my machine to swap? I'm scripting a monitor in perl that will alert me when available memory is dangerously low and system is swapping, and I would like to simulate the scenario. I am clueless how to make my system lack... (4 Replies)
Discussion started by: marcpascual
4 Replies

6. Shell Programming and Scripting

User perl to get memory installed in a machine

I currently have a statistics gathering script i run on my Linux servers. One of the stat i gather is total memory in the machine. The script is all perl with the exception of gathering the memory for that i use the following command: $ram = (`cat /proc/meminfo | grep "MemTotal" | awk... (1 Reply)
Discussion started by: insania
1 Replies

7. Shell Programming and Scripting

Out Of Memory in Perl

Hi , when one of the perl script is being executed i am getting the following error as out of memory, when i check memory utilisation it is showing as 60% . cp utilisation as 11%. swap is free for 19 gb. can anyone guide me to sort the above isssue.i want to know the root cause. (2 Replies)
Discussion started by: Ajoy
2 Replies

8. Shell Programming and Scripting

Perl code Out of memory problem

Hi I am working with a 3.0 GB file and running the following script to process it. After running for 15 minutes, the script stops saying Out of memory or Killed. Can the experts suggest where my code can be improved to save memory? Thanks in advance. #! usr/bin/perl use warnings; open... (3 Replies)
Discussion started by: polsum
3 Replies

9. UNIX for Dummies Questions & Answers

Fork resource unavailable error, max # filehandles open?

I wrote a perl program that simultaneously reads in data from 691 tar.gz files using zcat. I can run one instance of the program without any issues and the memory and swap sizes are negligible. However, when I attempt to run more than 1 I start to get fork: resource unavailable messages. Are... (6 Replies)
Discussion started by: aquinom85
6 Replies

10. Shell Programming and Scripting

Out of memory issue in perl

I am getting a out of memory issue while executing the perl program. Per version : /opt/acc_perl/lib/site_perl/5.14.2 Read in 54973 total records Read in 54973 table records from table. Out of memory! so the job get failed due to out of memory. need to get rid of the out of memory... (3 Replies)
Discussion started by: ramkumar15
3 Replies
Output(3pm)						User Contributed Perl Documentation					       Output(3pm)

NAME
SGMLS::Output - Stack-based Output Procedures SYNOPSIS
use SGMLS::Output; To print a string to the current output destination: output($data); To push a new output level to the filehandle DATA: push_output('handle',DATA); To push a new output level to the file "foo.data" (which will be opened and closed automatically): push_output('file','foo.data'); To push a new output level to a pipe to the shell command "sort": push_output('pipe','sort'); To push a new output level appending to the file "foo.data": push_output('append','foo.data'); To push a new output level to an empty string: push_output('string'); To push a new output level appending to the string "David is ": push_output('string',"David is "); To push a new output level to The Great Beyond: push_output('nul'); To revert to the previous output level: pop_output(); To revert to the previous output level, returning the contents of an output string: $data = pop_output(); DESCRIPTION
This library allows redirectable, stack-based output to files, pipes, handles, strings, or nul. It is especially useful for packages like SGMLS, since handlers for individual SGML elements can temporarily change and restore the default output destination. It is also particu- larly useful for capturing the contents of an element (and its sub-elements) in a string. Example: sgmls('<title>', sub{ push_output('string'); }); sgmls('</title>', sub{ $title = pop_output(); }); In between, anything sent to output (such as CDATA) will be accumulated in the string returned from pop_output(). Example: sgmls('<tei.header>', sub { push_output('nul'); }); sgmls('</tei.header>', sub { pop_output(); }); All output will be ignored until the header has finished. AUTHOR AND COPYRIGHT
Copyright 1994 and 1995 by David Megginson, "dmeggins@aix1.uottawa.ca". Distributed under the terms of the Gnu General Public License (version 2, 1991) -- see the file "COPYING" which is included in the SGMLS.pm distribution. SEE ALSO
: SGMLS. perl v5.8.8 2004-02-22 Output(3pm)
All times are GMT -4. The time now is 03:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy