The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
memory leak? lenna IP Networking 2 05-25-2009 06:35 AM
Memory leak in pthread mindTeaser UNIX for Advanced & Expert Users 4 05-18-2009 01:30 AM
Memory LEAK with pthreads JEscola High Level Programming 8 05-15-2009 10:12 AM
about virtual memory and memory leak shriashishpatil High Level Programming 4 02-20-2006 11:31 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-26-2009
satvelucbe satvelucbe is offline
Registered User
  
 

Join Date: May 2009
Posts: 1
memory leak in igawk script

Hi,
We are having igawk statement calling gawk function and processing a master file, each gawk function have rules and action. We are using associative array to keep the output of each rule and finally printing the associative array. We are seeing the memory is growing incrementally in TOP command (size, res). We are deleting the associatve arrays after each pass.

igawk --re-interval -F -v OFS= -f symc.import.awk.Utils -f symc.import.cb.3eye.DSConstants -f symc.import.cb.3eye.DSUtilities -f AR_State_Master_DS1.gawk -f AR_State_Master_DS2.gawk -f Sub_Expr_Master_DS1.gawk -f corrections_Generator.gawk -f metricsGenerator.gawk -f update_Master.gawk "master.txt"

1. What are the tools I can use to find the memory leak
2. What could cause memory leak in gawk with associative array
  #2 (permalink)  
Old 05-26-2009
cambridge cambridge is offline
Registered User
  
 

Join Date: May 2009
Posts: 55
How about putting system("echo label; ps -o pid,ppid,sz,pcpu,pmem,args >> tmpfile") at intervals throughout your script, alternating the label, to identify when the process size is increasing? It may be there's a value in an associative array you've forgotten to delete, or it might be you have a bug in your version of gawk (not unheard of - I've found some versions of gawk leak memory when you use index(), but worked fine if I replaced that with a regular expression).
Sponsored Links
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 02:58 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0