Re: vmstat WARNS6 cleanup

看板DFBSD_submit作者時間21年前 (2005/01/09 04:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/10 (看更多)
On Sat, Jan 08, 2005 at 08:48:34PM +0100, Peter Schuller wrote: > Yes, I am aware of this. Hence any use of alloca is going to be an optimiation > only, conditional on the buffer size being below some small value -> malloc > would be required anyway so it doesn't solve the exit path issue. In almost all cases, malloc is better than alloca, if only to warrant some extra care to free the memory and therefore keep track of what you allocated. Yes, this is exactly the reverse of Garbage Collection, but GC is not always The Right Thing (TM). Therefore patches to change alloca uses correctly into malloc / free uses or other great stack allocations are certainly welcome. Keep in mind though, that we don't bother about one or two pages of stack in a leaf function, but anything above let's say 32 pages [add other arbitrary value here] should be really investigated. Joerg
文章代碼(AID): #11u4DA00 (DFBSD_submit)
討論串 (同標題文章)
文章代碼(AID): #11u4DA00 (DFBSD_submit)