Re: evc4 app memory leak

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



You've got a leak. If you never malloc or LocalAlloc (or use a heap
allocation), then it could be an object, it could be a handle or some other
object that when you call an API, the OS creates for you. That's about the
only thing we can say with what we know.

Getting Entrek's tools working is probably your best bet for finding the
problem.


--
Chris Tacke - Embedded MVP
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--


"Andrew Kennard" <andrew@xxxxxxxxxxxxxxxxx> wrote in message
news:uiffS9%23WHHA.4188@xxxxxxxxxxxxxxxxxxxxxxx
Hi all

I have a quite large evc4 app that leaks 4096 bytes now an again untill
eventually all of the memory is used up

I do not use any mallocs etc in the code

I do have some objects created via new and deleted with delete and have
checked these and they all appear to have new/delete pairs. I've also now
changed my 'bad code' using C Tacke help via this group. The changing of
this code has improved things but not completly fixed them

The app does have a section that deals with socket communication that uses
sending and recv threads which i'm guessing is where the problem lies but
not 100% sure

I've tried downloading Entrek tools for evaluation. I've installed them on
my XP machine and they can talk to my HP2210 PPC2003 device and I can
browse to the app. But on clicking Go! it all locks up. I've emailed their
support address but as yet no reply.

Is there any chance anyone can give me anymore clues ?

Thanks in advance

Andrew

PS I've also tried crtdbg.h etc that tracks the new/delete commands and
that is not showing any errors.




.



Relevant Pages

  • Re: Does ever growing SZ from ps indicate memory leak?
    ... through malloc. ... The app does plently more. ... might do other allocations such as using sbrk? ... So your application either has a leak, ...
    (comp.unix.programmer)
  • Re: malloc questions in C
    ... malloc() or one of the similar functions, it will be available until you call free. ... A lot of C implementations will also free this memory for you when your program exits, ... /* a) myhappyfunmodule has an internal memory leak */ ...
    (comp.lang.c)
  • Re: Trouble with malloc().
    ... > I am having trouble with malloc() again for a PC app I am developing. ... > The compiler reports warning 'Suspicious pointer conversion' as indicated ... What makes you think that nat + sizeofyields a memory ...
    (comp.lang.c)
  • Re: What does SZ on the ps output mean?
    ... originally assumed that no matter how many malloc and frees were done, ... there shouldn't be an upward trend. ... hope of spotting any memory leak. ... examine the java heap as mgd by the JVM. ...
    (comp.unix.solaris)
  • Re: Cant create auto redraw error
    ... that's what I meant by many command button. ... My app is menu driven restaurant/Kiosk app. ... "We have a VB6 app that causes a gdi object leak in windows explorer, ... the explorer.exe would leak gdi objects. ...
    (microsoft.public.vb.general.discussion)