Re: Memory problems (possibly very easy question)
- From: "Tom Serface" <tserface@xxxxxxx>
- Date: Thu, 30 Nov 2006 06:56:12 -0800
It could be that there is some library function call that is allocating
memory that is not getting released. Also, I've seen times when the memory
is not released immediatedly to the OS until the program is actually closed.
I'm not sure how this mechanism works, but I've never seen memory not
returned after a program is closed. I've been caught by functions like
strdup() that allocate memory then expect the caller to free it when
appropriate.
I am also interested in the end of this story.
Tom
"peter koch" <peter.koch.larsen@xxxxxxxxx> wrote in message
news:1164894546.668148.143570@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I see no possibility for fragmentation. Theres a loop: (1) allocate
memory (b) free memory
This will not cause any fragmentation. I agree that theres a small
amount of freeing memory for the vector (as reallocations take place),
but this will be valid for the first run of the loop.
The only logical answer is that memory does not get released. I look
forward to hear if the OP solves his problem, but I'd bet its related
to a real memory leak somewhere - not fragmentation.
/Peter
.
- References:
- Re: Memory problems (possibly very easy question)
- From: Joseph M . Newcomer
- Re: Memory problems (possibly very easy question)
- From: peter koch
- Re: Memory problems (possibly very easy question)
- From: Joseph M . Newcomer
- Re: Memory problems (possibly very easy question)
- From: peter koch
- Re: Memory problems (possibly very easy question)
- Prev by Date: Re: Using shared resources between multiple projects
- Next by Date: Re: How to call function of Dialog box from custom tree control class?
- Previous by thread: Re: Memory problems (possibly very easy question)
- Next by thread: Re: Memory problems (possibly very easy question)
- Index(es):
Relevant Pages
|