[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vocal
Subject:    Re: [Vocal] Re: [Sip] memory leak (urgent)
From:       BRYAN OGAWA <bko () cisco ! com>
Date:       2001-06-27 22:45:56
Message-ID: Pine.LNX.4.21.0106271545090.14787-100000 () bko-lnx ! cisco ! com
[Download RAW message or body]


steve,

i tried it on linux, and i only saw the standard stuff that is due to the
stl stack.  i'm trying to compile the win32 version now.

On Wed, 27 Jun 2001, Steve Ho wrote:

> Bryan:
> 
> Can you detect memory leak in Linux? You can just try
> a small testing program. 
> Is any difference in Linux & Windows for sip stack?
> Does sip stack call any extra functions under Windows?
> Is anyone in CuSeeMe or ... know about this?
> 
> Thanks.
> 
> Steve
> 
> --- BRYAN OGAWA <bko@cisco.com> wrote:
> > 
> > 
> > Steve,
> > 
> > I'm looking at this.  I'm not sure quite what's
> > happening.  I will see
> > what is happening if I can.
> > 
> > 
> > 
> > On Wed, 27 Jun 2001, Steve Ho wrote:
> > 
> > > Bryan:
> > > 
> > > Please just comment out the last two lines:
> > > aData = invite.encode;
> > > szData = aData.getData();
> > > 
> > > Then the function OnRegistration() will become to
> > > InviteMsg constructor. When the function execute &
> > > before it return to idle (waiting for another
> > action),
> > > it will call InviteMsg destructor. You can set
> > break
> > > point at InviteMsg destructor & SipMsg::~SipMsg.
> > You
> > > will see the program will go to destructor.
> > > If the program go through destructor, it suppose
> > clean
> > > up all the allocate memory. Why we still have
> > memory
> > > leak?
> > > Thanks.
> > > 
> > > Steve
> > > 
> > > --- BRYAN OGAWA <bko@cisco.com> wrote:
> > > > 
> > > > Steve,
> > > > 
> > > > could you reduce your code to ONLY construct and
> > > > destruct the InviteMsg  ?
> > > > 
> > > > Since your code does not appear to do very much
> > with
> > > > SIP, i'd recommend
> > > > reducing it to an absolutely trivial Invite
> > creation
> > > > and not do anything
> > > > else.
> > > > 
> > > > On Wed, 27 Jun 2001, Steve Ho wrote:
> > > > 
> > > > > Hi Chok & Bryan:
> > > > > 
> > > > > Please review the attached files. This is a
> > > > testing
> > > > > program under Windows MFC. When you are
> > running
> > > > mfc in
> > > > > debug mode. After you exit the program. It
> > will
> > > > detect
> > > > > the memory leak.
> > > > > 
> > > > > #ifdef _DEBUG
> > > > > #define new DEBUG_NEW
> > > > > #endif
> > > > > 
> > > > > In MFC if you add the above lines, it will
> > detect
> > > > > memory leak ("new" function) at that file. You
> > > > need
> > > > > add the following lines in the file you want
> > to
> > > > detect
> > > > > memory leak.
> > > > > 
> > > > > Please compile & go to menu - "Test",
> > > > "Registration".
> > > > > Then it will set InviteMsg. 
> > > > > 
> > > > > > 1.  some C++ template / std library
> > > > implementations
> > > > > > use memory pools for
> > > > > > performance reasons.  if this is the case,
> > the
> > > > > > memory may not be detected
> > > > > > as being freed.
> > > > > 
> > > > > I have written template / std library before.
> > MFC
> > > > will
> > > > > detect memory leak if program did not free
> > memory.
> > > > > 
> > > > > > Note that 1 is true under Linux, so the
> > stack
> > > > grows
> > > > > > depending on the load,
> > > > > > and then stabilizes in size (it is very
> > large,
> > > > over
> > > > > > 70MB).
> > > > > 
> > > > > Does any one test under Windows? I saw my SIP
> > > > server
> > > > > memory keep growing when it receive sip signal
> > > > under
> > > > > windows. I'll check when it will stop growing.
> > > > > 
> > > > > >if the
> > > > > > siptransceiver is not
> > > > > > freed, it may not free all of its databases.
> > > > > 
> > > > > How to free siptransceiver? 
> > > > > BTY, I use my own socket transmission
> > function. I
> > > > > think I did not use siptransceiver.
> > > > > 
> > > > > Thanks.
> > > > > 
> > > > > Steve
> > > > >  
> > > > > --- BRYAN OGAWA <bko@cisco.com> wrote:
> > > > > > On Wed, 27 Jun 2001, Steve Ho wrote:
> > > > > > 
> > > > > > > I have tried to wait for more than 60
> > seconds.
> > > > The
> > > > > > > memory leak still the same. Where is the
> > > > memory
> > > > > > leak
> > > > > > > come from?
> > > > > > > Does vocal server or ua under Linux have
> > this
> > > > > > problem?
> > > > > > > I just use the SIP stack under Windows
> > 2000. I
> > > > saw
> > > > > > my
> > > > > > > SIP application memory keep increasing
> > when it
> > > > > > > send/receive sip signal.
> > > > > > 
> > > > > > Steve,
> > > > > > 
> > > > > > Do you know under what situations Visual C++
> > > > detects
> > > > > > memory leaks?
> > > > > > 
> > > > > > here are a few possibilities:
> > > > > > 
> > > > > > 1.  some C++ template / std library
> > > > implementations
> > > > > > use memory pools for
> > > > > > performance reasons.  if this is the case,
> > the
> > > > > > memory may not be detected
> > > > > > as being freed.
> > > > > > 
> > > > > > 2.  depending on how Visual C++ does leak
> > > > > > accounting, it may be accruing
> > > > > > leaks for things not explicitly freed.  if
> > the
> > > > > > siptransceiver is not
> > > > > > freed, it may not free all of its databases.
> > > > > > 
> > > > > > Note that 1 is true under Linux, so the
> > stack
> > > > grows
> > > > > > depending on the load,
> > > > > > and then stabilizes in size (it is very
> > large,
> > > > over
> > > > > > 70MB).
> > > > > > 
> > > > > > I hope this helps.
> > > > > > 
> > > > > > BTW:  1.2.0 has a few other wrinkles --
> > first,
> > > > it
> > > > > > grows even bigger under
> > > > > > load, and second, I believe it holds INVITEs
> > 180
> > > > > > seconds, not 32.
> > > > > > 
> > > > > > > 
> > > > > > > Steve
> > > > > > > 
> > > > > > > --- Chok Lam <chok@cisco.com> wrote:
> > > > > > > > I don't know if it has something to do
> > with
> > > > the
> > > > > > > > stack keeping the messages for 32
> > seconds.
> > > > Can
> > > > > > > > you add a sleep() for say 40 seconds
> > before
> > > > the
> > > > > > > > program exits?
> > 
> === message truncated ===
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
> _______________________________________________
> vocal mailing list
> vocal@vovida.org
> http://www.vovida.org/mailman/listinfo/vocal
> 

-- 
Bryan K. Ogawa  <bko@cisco.com>  http://www.vovida.org/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic