httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joachim Zobel <jzo...@heute-morgen.de>
Subject Re: How to identify apache memory
Date Mon, 05 Mar 2007 19:38:07 GMT
Am Montag, den 05.03.2007, 17:23 +0000 schrieb Nick Kew:
> On Mon, 05 Mar 2007 07:55:06 +0100
> Joachim Zobel <jzobel@heute-morgen.de> wrote:
> 
> > I can however provide my own memmory allocation functions to libxml2,
> > so if I can identify apache memory, I can work around this.
> 
> Have you looked at wrapping apr_palloc and [do nothing] as malloc
> and free respectively?
> 
> I have some recollection of contemplating that with libxml2,
> but I haven't pursued it.

Yes, that is possible, see
http://xmlsoft.org/html/libxml-xmlmemory.html#xmlMemSetup. The problem
is that I don' want to wrap [do nothing] as free, because malloc and
free are global functions and because I am inside a filter. So I am
looking for a way to do

if (!allocated_by_apache(ptr) {
  free(ptr);
}

Sincerely,
Joachim







Mime
View raw message