On Wed, Sep 14, 2011 at 14:01, Christoph Gröver <gro...@sitepark.com> 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 copy over the data.

If you're worried about memory wastage, create a child pool and
apr_palloc() from there. apr_pool_destroy() the pool to reclaim the
memory.

Reply via email to