Re: phk malloc, was (Re: ptmalloc2)

看板DFBSD_kernel作者時間21年前 (2005/02/23 14:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串19/57 (看更多)
:Correction: I just found out that the Linux kernel does support what I am :looking for, and it's done through a sysctl! See : :Documentation/vm/overcommit-accounting in the Linux source tree. : :Thanks all. I will run dnscache and MessageWall on Linux only for :the reliability's sake. *BSD is fine for disk-writing email servers. I am :not using any other 'preallocating' services that I am aware of. : :Peace! Well, you are welcome to run software on whatever platform you feel fits it best, but no magic sysctl is going to make your systems more dependable if the software running on them is trying to use more resources then are available. Unless you are actually running yourself out of swap space (which is kinda hard to do on a modern machine with a 120G hard drive), that sysctl is going to have no effect other then to make the machine fall over earlier rather then later. It will certainly not make the box any more dependable, I can guarentee you that. Virtually no software in this day and age is written to deal with every possible memory failure. Software is usually written to assume that at least a 'reasonable' amount of memory is going to be available. so, e.g. a program which copies its command line arugments will generally assume that it can do so without having to check for an out of memory condition. These sorts of tiny, limited allocations make up most of the allocations most pieces of software make. Unless you intend to go through millions of lines of code and add tens of thousands of more lines to check every single memory allocation made, let alone run regression tests to make sure that your cleanup code actually works (in short, unless you are writing software that is going to run in a satellite or space probe or the space shuttle), having an overcommit knob isn't going to help you. -Matt Matthew Dillon <dillon@backplane.com>
文章代碼(AID): #1271mb00 (DFBSD_kernel)
討論串 (同標題文章)
文章代碼(AID): #1271mb00 (DFBSD_kernel)