2008-08-29 18:04:49     Call to System( ) leaks memory?

Document created by Aaronwu Employee on Aug 7, 2013
Version 1Show Document
  • View in full screen mode

2008-08-29 18:04:49     Call to System( ) leaks memory?

Matt Gilg (UNITED STATES)

Message: 61388   

 

It seems that a call to the system() function is leaking.

 

while(1){

 

system("ls");

 

}

 

After about 8 minutes, the program stats looked like this:

 

root:/proc/4984> cat status

Name:   mem-test

State:  S (sleeping)

SleepAVG:       88%

Tgid:   4984

Pid:    4984

PPid:   172

TracerPid:      0

Uid:    0       0       0       0

Gid:    0       0       0       0

FDSize: 32

Groups:

Mem:     1857984 bytes

Slack:    132672 bytes

Shared:        0 bytes

Threads:        1

SigQ:   0/256

SigPnd: 0000000000000000

ShdPnd: 0000000000000000

SigBlk: 0000000000000000

SigIgn: 0000000000000006

SigCgt: 0000000000000000

CapInh: 0000000000000000

CapPrm: 00000000fffffeff

CapEff: 00000000fffffeff

 

 

Version info:

 

Linux release 2.6.19.3-ADI-2007R1-svn228, build #354 Mon Aug 25 17:32:03 MDT 2008

release 2007R1, build #576 Mon Aug 25 18:02:58 MDT 2008

 

 

Anybody have an idea of why this might be happening?  Help with the matter would be greatly appreciated!

 

Thanks,

 

-Matt Gilg

 

 

 

 

 

 

 

 

QuoteReplyEditDelete

 

 

2008-08-29 18:11:38     Re: Call to System( ) leaks memory?

Mike Frysinger (UNITED STATES)

Message: 61389   

 

upgrade to the latest release

 

QuoteReplyEditDelete

 

 

2008-08-29 18:43:41     Re: Call to System( ) leaks memory?

Matt Gilg (UNITED STATES)

Message: 61390   

 

Thanks Mike, we will go ahead and do that.  Is there a system-wide signal that we can trap when we have a failed memory allocation?

 

-Matt Gilg

QuoteReplyEditDelete

 

 

2008-08-29 18:57:18     Re: Call to System( ) leaks memory?

Mike Frysinger (UNITED STATES)

Message: 61391   

 

afaik, there is not

QuoteReplyEditDelete

 

 

2008-08-29 19:04:28     Re: Call to System( ) leaks memory?

Matt Gilg (UNITED STATES)

Message: 61392   

 

Thank you for the info.

 

-Matt Gilg

Attachments

    Outcomes