[Expat-bugs] [ expat-Bugs-632146 ] xmlwf: memory demands

noreply@sourceforge.net noreply@sourceforge.net
Wed Nov 20 18:25:25 2002


Bugs item #632146, was opened at 2002-11-01 17:15
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=632146&group_id=10127

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Rolf Ade (pointsman)
Assigned to: Karl Waclawek (kwaclaw)
Summary: xmlwf: memory demands

Initial Comment:

expat 1.95.5

Running xmlwf against bigger XML files needs almost the
double of the file  size of memory (at the end, the
process size grows permanently during the  processing).
This looks pretty wrong to me, since the tool does SAX
parsing.

Please notice, that this seems to be a problem only
with the xmlwf code, not with the expat lib per se. An
application by me, build on top of expat, doesn't shows
this behavior. Instead, the memory size of the process
stays constant and pretty low, even while parsing big
XML files - which is, what I also would have expected
from the xmlwf tool.

I'm sorry, for only reporting the problem and not
digging into.

rolf


----------------------------------------------------------------------

>Comment By: Rolf Ade (pointsman)
Date: 2002-11-20 18:25

Message:
Logged In: YES 
user_id=13222

The problem shows even with no options given to xmlwf. i.e.
xmlwf  <xmlFile>

Just use a (big)  XML file and watch the xmlwf process grow
in the process table. (You need a really big one (several 10
MBytes) to have a change to see it with ordinary ps (on
unix) or the task manager (on MS), because otherwise expat
is finished, before you had a chance to see anything ;.)).

No, I would bet, it's not a (classical)  memory leak. I've
memory debugged expat based applications several times, and
the lib doesn't leak memory (or only very seldom under rare
circumstances,)

I've just valgrind'ed (mem leak checker) an xmlwf run, which
shows the depicted behavior (xmlwf process size grows far to
much), but there is no mem leak -. no pointer to allocated
memory is lost, and all allocated memory is cleand up at the
end. So eventually there are depending on the file size used
some really big buffers, or something else.

rolf


----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2002-11-20 16:36

Message:
Logged In: YES 
user_id=290026

I fixed a small memory leak, but don't think this
applies here - the leak would only occur under certain
error conditions.

I couldn't really find a problem in the xmlwf code
at a first check. Does this memory leak also happen 
with older versions of  the expat lib?

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2002-11-20 16:07

Message:
Logged In: YES 
user_id=290026

What options are you using when calling xmlwf?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=632146&group_id=10127



More information about the Expat-bugs mailing list