[xml] memory usage question

After some testing to get an approximation on memory usage I was wondering if anyone could answer this question.
I created a document about 12.5MB in size that looks like the following:
  <book id="1"><title>1</title><pages>1</pages></book>
  <book id="2"><title>2</title><pages>2</pages></book>

There are 40,000 book elements.

Building a Tree I get vastly differing memory usage under windows compared to linux (same libxml2 code base). Both are using dictionairies.
Under windows:
MEMORY ALLOCATED : 85608844, MAX was 85618277

Under linux:
MEMORY ALLOCATED : 171403887, MAX was 171413249

Of course using the reader interface (not building tree) memory usage is similar in both cases:
MEMORY ALLOCATED : 171135, MAX was 172151

Question is why the drastic difference in memory usage when building a tree on the different platforms?
Also, any ideas on % of memory thats due to being a debug build?



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