Re: [xml] Memory usage 32 bit vs. 64 bit Linux

Robert Grasböck schrieb am 05.05.2015 um 15:52:
I have a question about memory usage of libxml2.
I'm using libxml2 on two different systems, once a 32 bit linux other one a
64 bit linux.
On both I run the same application which use libxml2 to parse xml files.
The application opens many small xml files (~200) with xmlParseFile.
The document (xmlDocPtr) stays open in memory.
I now noticed that the application running on 64 bit Linux uses more the 4
times the heap memory as on the 32 bit version. I could understand a double
up of used memory due to all the pointers are now double the size. But 4

I did a check with valgrinds massif tool and it tells me that most of the
heap allocation (in my case 2/3 of the total heap consumption) comes from
libxml2 xmlParseFile.

I don't know if it's a issue of libxml2 directly, but it seems it is.
I would appreciate any suggestions to get the memory usage down!

Have you enabled the COMPACT parsing option? It avoids text nodes for short
text content and benefits a lot from a 64 bit architecture.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]