[omniORB] Memory leak profiling

Nitin Singhal nsinghal at quark.com
Thu Apr 21 11:51:09 BST 2005


I am yet to profile it. But my application(or the ORB) on windows shows lots of memory leaks
using the Windows CRT debugging. I am going to add the ORB to the memory leak tests
and see if I can find anything substantial.
What I am going to do is something on the lines:

Listing of MySourceFile.cpp

#ifdef _DEBUG
#define new new(_NORMAL_BLOCK, SRC_FILE, __LINE__)
#undef SRC_FILE
static char SRC_FILE[] = __FILE__;
#endif

int main()
{
	_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
	// ...
}

This is going to dump all the memory leak warning on the debugger output window 
at application exit.I need to do the 
[ #define new new(_NORMAL_BLOCK, THIS_FILE, __LINE__) ] in all the
source files so that I can make sure that the leak report contains the correct
source file line number. 
Is this a reasonable solution to a memory leak profiling on windows? And can I add
it to the omniORB code ?

Thanks
Nitin


-----Original Message-----
From: Duncan Grisby [mailto:duncan at grisby.org]
Sent: Wednesday, April 20, 2005 11:31 PM
To: Nitin Singhal
Cc: omniorb-list at omniorb-support.com
Subject: Re: [omniORB] Memory leak profiling


On Wednesday 20 April, "Nitin Singhal" wrote:

> Are there provisions in omniORB to perform some kind of memory leak
> profiling?

No specific provisions.

> Has a memory leak profiling been done for the orb ?

Yes. I regularly run it under valgrind, and in the past I've used Purify
on it. I'm sure plenty of other people run memory leak checkers on their
applications that use omniORB.

Are you seeing a leak?

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list