Re: [xml] Memory not going away..

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 swapped out than memory
that's really being used...

In Linux, calls to free in the process
return the memory to the OS.

Memory allocated via mmap() is released via munmap(); memory allocated
via sbrk() is not releasedd back to the operating system.

At least according to the version of GLibc that I just read.


Rich Salz                  Chief Security Architect
DataPower Technology
XS40 XML Security Gateway

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