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

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.

        /r$

-- 
Rich Salz                  Chief Security Architect
DataPower Technology       http://www.datapower.com
XS40 XML Security Gateway  http://www.datapower.com/products/xs40.html




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