Re: phk malloc, was (Re: ptmalloc2)

看板DFBSD_kernel作者時間21年前 (2005/02/24 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串30/57 (看更多)
On Tue, Feb 22, 2005 at 01:50:45PM -0500, Dan Melomedman wrote: > This begs the question whether we could have a feature to disable > overcommit on a sysadmins', or the software's demand. You can easily disable memory overcommit. You just have to ensure that kern.maxproc * max(Virtual Memory Size) <= Physical Memory + Swap. A normal system doesn't want to satisfy that relation. Any threaded program has a acquire a fixed heap size in advance, with libthread_xu that will be 2 MB per thread. A well-written application doesn't need it under normal circumstances. But those application don't care about about changing the default either. Any shared mmap would have to be fully accounted to each of programs, since the system doesn't know in advance if they won't be remapped writeable later on. There are a lot of other examples. To summarize this, for a normal system disabling overcommit just hurts. It's the responsibility of the administrator to ensure that enough swap is available or to adjust the process limits accordingly. Joerg
文章代碼(AID): #127CJe00 (DFBSD_kernel)
討論串 (同標題文章)
文章代碼(AID): #127CJe00 (DFBSD_kernel)