[Expat-bugs] [ expat-Bugs-1566826 ] More "Frees" than "Allocs"
SourceForge.net
noreply at sourceforge.net
Fri Sep 29 15:13:46 CEST 2006
Bugs item #1566826, was opened at 2006-09-28 03:07
Message generated for change (Comment added) made by kwaclaw
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1566826&group_id=10127
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: More "Frees" than "Allocs"
Initial Comment:
I used the Expat 2.0 in our project and it seems to
work fine. I did a kind of component test using the
parser including testing the expat sources. As i wrote
own memory allocation functions (called ONLY by expat
sources) i saw that the free function is called more
often than the alloc function. Nevertheless all memory
areas allocated with alloc will be freed again.
Email: chris_1270 at web.de
----------------------------------------------------------------------
>Comment By: Karl Waclawek (kwaclaw)
Date: 2006-09-29 09:13
Message:
Logged In: YES
user_id=290026
As far as I remember, the memory consumption does not
increase a lot for larger files, but there is a certain
amount of memory allocated initially. Short of re-designing
Expat this cannot ve avoided.
However, you can probably reduce it by re-building Expat
with some symbols undefined, like XML_CONTEXT_BYTES or
XML_DTD (if not needed). There is also XML_MIN_SIZE to try.
Just search expat-discuss - there have been such discussions
in the past.
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2006-09-29 03:57
Message:
Logged In: NO
Sorry it was an error on my side in the functions which
realized the counting of free and allocs. SO it seems to
work fine. Sorry for your effort.
But i have got another question regarding the memory
demand. So it seems that also for small XML documents a lot
of heap is needed (e.g. for a document with 1000 Bytes
about 4000 Bytes memory is allocated). Because i want to
use the parser in an embedded device its a lot of memory
for my project (perhaps too much!). Perhaps you have an
idea that the parser needs less memory!??
----------------------------------------------------------------------
Comment By: Karl Waclawek (kwaclaw)
Date: 2006-09-28 09:17
Message:
Logged In: YES
user_id=290026
Should that not trigger some sort of error?
Any ideas which free calls are superfluous?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1566826&group_id=10127
More information about the Expat-bugs
mailing list