Re: [xml] Memory not going away..

Yes, but then I should be able to get that memory back in future calls to
(m/c)alloc.  The real problem I am fighting with here is that my XML files
are large (10^8 bytes), and I am unable to parse the entire file with
xmlParseFile _and_ create my data structures.  I realize that I should be
using some form of reader, but all I really need is for the xmlDoc to
release the memory on calls to xmlFreeDoc.. which, it is still not doing
after all this time.

I wrote a test script which tests the basic behaviour, and the doc is
freed.. but when I carry over the solution to my code, the file will not
go away.  The .memdump IS listing items now, and I am struggling to figure
out why these objects are not being removed.

Coincidentally, if I have system with 3 GB of RAM, and I allocate and free
3GB of ram in my process, but then do not exit.. any other processes would
be forced into swap waiting for my process to complete and free up
resources (namely, 3GB of RAM).  In Linux, calls to free in the process
return the memory to the OS.

David Bauer

Ph.D Candidate, Rensselaer Polytechnic Institute
Computer Science Department

Office: Amos Eaton 205
Phone : (518) 276 2657
URI   :

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