[xml] xmlMemUsed() always returns 0 even when mem debug is activated
- From: apaxeros gmail com
- To: xml gnome org
- Subject: [xml] xmlMemUsed() always returns 0 even when mem debug is activated
- Date: Thu, 18 Dec 2008 15:29:55 +0100
Hello,
I've been trying to evaluate the amount of memory allocated using xmlMemUsed. A similar question was asked in 2004:
http://mail.gnome.org/archives/xml/2004-March/msg00232.html, and Daniel replied that mem debug had to be activated. That's why I recompiled libxml2 (version 2.6.30, on Ubuntu 8.04) with the option --with-mem-debug. Unfortunately, the following code:
doc = xmlParseFile(argv[2]);
if (doc == NULL)
{
printf ("%s could not be parsed\n", argv[2]);
exit (1);
}
printf("Used memory: %d\n", xmlMemUsed());
xmlDocDump(stdout, doc);
always returns "Used memory: 0", while xmlDocDump() generates a correct output. Is there a special way of using this function ?
Regards,
Felip.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]