Date: Tue, 07 Nov 2006 08:02:29 -0500 From: "Kevin Curtis, Jr." <kevin@unixsite.net> To: freebsd-bugs@freebsd.org Subject: misc/104859: rpc.statd immediately allocates 256 million bytes of memory upon invocation Message-ID: <455083E5.1010705@unixsite.net>
next in thread | raw e-mail | index | archive | help
Kriston, I noticed the same issue and did some research. Read the following excerpt from http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/book.html#STATD-MEM-LEAK 10.25. Why is rpc.statd using 256 megabytes of memory? No, there is no memory leak, and it is not using 256 Mbytes of memory. For convenience, rpc.statd maps an obscene amount of memory into its address space. There is nothing terribly wrong with this from a technical standpoint; it just throws off things like top(1) and ps(1). rpc.statd(8) maps its status file (resident on /var) into its address space; to save worrying about remapping it later when it needs to grow, it maps it with a generous size. This is very evident from the source code, where one can see that the length argument to mmap(2) is 0x10000000, or one sixteenth of the address space on an IA32, or exactly 256MB. Sincerely, Kevin Curtis, Jr.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?455083E5.1010705>