Re: [xml] too many mallocs?
- From: "Peter Jacobi" <pj walter-graphtek com>
- To: veillard redhat com
- Cc: xml gnome org
- Subject: Re: [xml] too many mallocs?
- Date: Thu, 23 May 2002 18:30:17 +0200
Daniel, All,
And there are 37 mallocs of size 3944 in case 1, compared with
62 mallocs of size 3900 in case 2, most likely from xmlInputBufferGrow.
I think Garry Pennington looked at this recently.
I now think I know what's causing this, but I don't have a clean patch yet.
Once we are within INPUT_CHUNK near the end of file,
xmlParserInputGrow and xmlParserInputBufferGrow will
be called from every GROW (and always report they can
read zero bytes).
For a test I appended 2*INPUT_CHUNK of '\0' to the input buffer
in xmlParserInputGrow once xmlParserInputBufferGrow
returns zero. This eliminates further calls and mallocs,
but I assume it will break quite a lot (when more than
one entity is parsed).
Regards,
Peter Jacobi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]