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
/ \ [EMAIL PROTECTED]
( OZ ) World tour 2000
---> X_.---._/ presently in: Perth
v
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message