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
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).
No. Your free'd pages are more likely to be
On Tue, Mar 08, 2005 at 03:35:30AM -0500, David W. Bauer Jr. wrote:
I have a simple test script I am using to my code:
int
main(int argc, char **argv, char **env)
{
xmlDocPtr document_network = NULL;
xmlXPathContextPtr ctxt = NULL;
xmlXPathInit();
you
In broad handwaving terms, once a process allocates memory, that memory does not
go back to the system until the process terminates. Malloc will call brk, but
free will not try to give it back to the kernel, it will keep it in the process
on the chance that the process will want memory again.
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
On Tue, Mar 08, 2005 at 12:04:51PM -0500, David W. Bauer Jr. wrote:
I re-compiled with --mem-debug and this is the contents of .memdump:
11:47:59 AM
MEMORY ALLOCATED : 0, MAX was 222911016
BLOCK NUMBER SIZE TYPE
That's it.
okay, perfect, libxml2 released with
Ok, I have provided the simplest of examples, and cannot account for why
this is so either, but that doesn't change the fact that it is so.
Probably, I am just got lucky in some way.. but this should be simple
enough for someone to look at and see what is wrong immediately.
After spending the
On Tue, Mar 08, 2005 at 05:43:22PM -0500, David W. Bauer Jr. wrote:
Ok, I have provided the simplest of examples, and cannot account for why
this is so either, but that doesn't change the fact that it is so.
I can prove libxml2 actually free the memory. Use
xmllint --repeat --noout
On Tue, Mar 08, 2005 at 05:43:22PM -0500, David W. Bauer Jr. wrote:
Ok, I have provided the simplest of examples, and cannot account for why
this is so either, but that doesn't change the fact that it is so.
I can prove libxml2 actually free the memory. Use
xmllint --repeat --noout
On Tue, Mar 08, 2005 at 05:52:09PM -0500, David W. Bauer Jr. wrote:
One thing that I should mention is that the memory is NOT being released.
I know this for a fact becuase my application goes on (afer freeing the
xmlDoc) and allocates until the 3GB limit is reached.
So, what I see is this:
I cannot reproduce your problem, or your problem is with the memory allocator
of the linux system you used.
It must be..
One major difference is that I am now getting info in the .memdump file,
which I did not get in my test script:
[...]
MEMORY ALLOCATED : 32092, MAX was
11 matches
Mail list logo