Very strange problem 
Author Message
 Very strange problem

Hi,

My C++ application is a deamon which runs on Windows NT.
Its memory usage increases from 11M until my computer is crashes.
There are no memory leaks. For each "new" there is a suitable "delete", but
the
memory usage gows up.

If  I run the application from the command prompt (not in background),
then when I minimize the command prompt window, the memory usage
goes down starting to grow once again. Very strange, ah?

Do you have any ideas how to prevent this problem?

Thanks,
  Bella



Sat, 21 Dec 2002 03:00:00 GMT  
 Very strange problem

Quote:

> Hi,

> My C++ application is a deamon which runs on Windows NT.
> Its memory usage increases from 11M until my computer is crashes.
> There are no memory leaks. For each "new" there is a suitable "delete", but
> the
> memory usage gows up.

> If  I run the application from the command prompt (not in background),
> then when I minimize the command prompt window, the memory usage
> goes down starting to grow once again. Very strange, ah?

> Do you have any ideas how to prevent this problem?

> Thanks,
>   Bella

Are you doing database work?  I see a problem like this with MDAC 4 (using
ODBC), and can fix it by periodically closing the connection to the database.
The same program with ODBC 3.5 was fine.

--
Scott McPhillips [VC++ MVP]



Sat, 21 Dec 2002 03:00:00 GMT  
 Very strange problem
Well is ur application using a lot of GDI codes ?? and are u releasing all
allocated GDI objects ??


Quote:

> > Hi,

> > My C++ application is a deamon which runs on Windows NT.
> > Its memory usage increases from 11M until my computer is crashes.
> > There are no memory leaks. For each "new" there is a suitable "delete",
but
> > the
> > memory usage gows up.

> > If  I run the application from the command prompt (not in background),
> > then when I minimize the command prompt window, the memory usage
> > goes down starting to grow once again. Very strange, ah?

> > Do you have any ideas how to prevent this problem?

> > Thanks,
> >   Bella

> Are you doing database work?  I see a problem like this with MDAC 4 (using
> ODBC), and can fix it by periodically closing the connection to the
database.
> The same program with ODBC 3.5 was fine.

> --
> Scott McPhillips [VC++ MVP]



Sat, 21 Dec 2002 03:00:00 GMT  
 Very strange problem

Quote:

> My C++ application is a deamon which runs on Windows NT.
> Its memory usage increases from 11M until my computer is crashes.
> There are no memory leaks. For each "new" there is a suitable "delete",
but
> the memory usage gows up.

If I were a betting man, I'd put money on this being a memory leak, by the
sheer fact you're leaking memory...

My suggestion would be to either enable leak checking
 int nOldState = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
 _CrtSetDbgFlag(nOldState | _CRTDBG_LEAK_CHECK_DF);
Or get hold of Purify (or equivelent) -- I say Purify, because I know it can
actually do periodic leak checking for you...

Quote:
> If  I run the application from the command prompt (not in background),
> then when I minimize the command prompt window, the memory usage
> goes down starting to grow once again. Very strange, ah?

"goes down starting to grow"???
Quote:
> Do you have any ideas how to prevent this problem?



Sun, 22 Dec 2002 03:00:00 GMT  
 Very strange problem

Well... are you so sure there's a suitable delete for every new ?
you might THINK so, but you really have to test your code with BoundsChecker
or a similar tool.

  johndoe


Quote:
> Hi,

> My C++ application is a deamon which runs on Windows NT.
> Its memory usage increases from 11M until my computer is crashes.
> There are no memory leaks. For each "new" there is a suitable "delete",
but
> the
> memory usage gows up.

> If  I run the application from the command prompt (not in background),
> then when I minimize the command prompt window, the memory usage
> goes down starting to grow once again. Very strange, ah?

> Do you have any ideas how to prevent this problem?

> Thanks,
>   Bella



Wed, 19 Mar 2003 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Strange problem about Add member wizard

2. Strange problem with function call - Anyone?

3. VERY strange problem using the function gets()

4. Strange problem for 2 versions of VS.Net

5. Strange problem in C

6. A strange problem with importing TLB

7. Strange problem with WebResponse

8. Really strange problem ... [looser-level]

9. Strange Problem

10. strange problem

11. Strange problem

12. Strange problem

 

 
Powered by phpBB® Forum Software