Date: Mon, 03 Apr 2000 07:42:52 -0700 From: Julian Elischer <julian@elischer.org> To: hm@hcs.de Cc: Poul-Henning Kamp <phk@critter.freebsd.dk>, garyj@muc.de, bright@wintelcom.net, freebsd-current@FreeBSD.ORG Subject: Re: MLEN and crashes Message-ID: <38E8ADEC.794BDF32@elischer.org> References: <20000403131757.4F48238FA@hcswork.hcs.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Hellmuth Michaelis wrote: > > >From the keyboard of Poul-Henning Kamp: > > > We need to be frugal about the kernel stack, for a lot of reasons, > > that's just the way it is, and as far as I know it is the way > > it will continue to be. > > Good. I'd like to learn something from it: Shall i avoid allocating > structs on the kernel stack at all or is it just bad to allocate > big structs ? If the latter is true, what number is big > The best rule is never allocate anything bigger than a few elements. One reason to not allocate struct on the stack is that under some OS's (e.g. originally freebsd too) the stack could have been 'unmapped' while the that process was not in core, tus access toteh struct by an interrupt routine or something could be 'bad'. In FreeBSD this is presently not the case but.. Also, when we switch to ASYNC IO as a normal means of operation, the stack may sometimes be rewound before the IO is completed, which might also be considered "not a good thing" (TM). > -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000 ---> X_.---._/ presently in: Perth v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38E8ADEC.794BDF32>