Re: [xml] Per parser xmlGcMemSetup
- From: Joachim Zobel <jz-2006 heute-morgen de>
- To: veillard redhat com
- Cc: xml gnome org
- Subject: Re: [xml] Per parser xmlGcMemSetup
- Date: Sun, 06 May 2007 11:23:59 +0200
Am Sonntag, den 06.05.2007, 03:34 -0400 schrieb Daniel Veillard:
But mod_i18n should know it is operating on top of libxml2 parser,
so why doesn't it use the libxml2 allocation routines ? The SAX interfaces
at the C level are really parser specific, and libxml2 SAX2 have been heavilly
modified to improve performances, so I don't see why it would use a different
allocator then.
Sax buckets are actually not parser specific. I have no intention on
being multi parser, but I did not change them much when migrating from
expat to libxml2.
I use apache memory for them for two reasons:
1. It is easy to avoid leaks, because apache has memory allocations that
will automatically be freed when the request is done and
2. I know how to use it.
So I will change my code so that xmlGcMemSetup is called safely.
There is however one thing that worries me. If I have to take care for
libxml2 to not free memory passed into sax callbacks, this probably
means that on the other end I am leaking memory. Does libxml2 expect the
sax callbacks to take memory ownership?
Sincerely,
Joachim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]