![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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 |
|
||||
|
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 | ||
|
|