> But what if a process exists in a faulty way. Perhaps some PHP code
> that exists abnormally?
If the process exits, you've got no worries about memory. If a thread
hangs [indefinitely], before you can free memory, the memory is
probably the least of your problems.
On Wed, Sep 14, 2011 at 14:01, Christoph Gröver wrote:
> In a module I have to allocate and reallocate a chunk of memory.
> Because (AFAIK) Apache or its libraries do not support reallocation
> I use the standard functions malloc/realloc (and free), of course.
Don't do that. Use apr_palloc() and
Thank you, Nick, for your answer,
> > So would this result in a memory leak? (if this happens often!)
>
> Potentially yes, unless you can do an exhaustive analysis of all
> possible processing paths.
>
> The fix for that is to register a free as a pool cleanup
> immediately after the malloc/rea
Hi Joshua,
Thank you for your answer.
> If you malloc/calloc/realloc without a free you will leak memory.
>
Well, I use free(). I have implemented counters which prove that for
every malloc there's a free() called with normal operations.
But what if a process exists in a faulty way. Perhaps s
On Wed, 14 Sep 2011 14:01:19 +0200
Christoph Gröver wrote:
> So would this result in a memory leak? (if this happens often!)
Potentially yes, unless you can do an exhaustive analysis of all
possible processing paths.
The fix for that is to register a free as a pool cleanup
immediately after the
If you malloc/calloc/realloc without a free you will leak memory.
Do you have some reason to believe that another module might prevent your
module's calls to free() from being run? What do you have in mind
specifically?
You can also mimic realloc by just allocating more memory from the pool and
Hello list,
In a module I have to allocate and reallocate a chunk of memory.
Because (AFAIK) Apache or its libraries do not support reallocation
I use the standard functions malloc/realloc (and free), of course.
But what if there's a problem in another module?
Is it possible that due to some er