I'm doing a big network driver under Banyan Vines 7.0 (derived from AT&T
SysV source tree). My problem is: the default 4K stack size is too small
to my driver, how can i expand it to e.g. 8Kb? Is there any tunable
parameter could make it done easily?
Thanks in advance!
Joss
Modify your driver so that it does not have too much local (automatic) vars
inside the functions. I cannot believe that the 4k limit is is reached because
of recursion or procedure calls.
Joerg
--
EMail:jo...@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
j...@cs.tu-berlin.de (uni) If you don't have iso-8859-1
j...@fokus.gmd.de (work) chars I am J"org Schilling
URL: http://www.fokus.gmd.de/usr/schilling ftp://ftp.fokus.gmd.de/pub/unix
The source code size of the driver is over 10Mb (it's true!). At first,
it's written to run in WinNT4.0, and it really exceeded NT's 4Kb stack
limit and make NT down. I don't think i could modify local variables to
static by my hand and it will produce re-entry problems to functions.
I changed some stack size related parameters in /usr/include/sys/param.h
and rebuilt kernel, but it doesn't work. How can i get around of it?
Thank you any way.
Joss
> I'm doing a big network driver under Banyan Vines 7.0 (derived from AT&T
> SysV source tree). My problem is: the default 4K stack size is too small
> to my driver, how can i expand it to e.g. 8Kb? Is there any tunable
> parameter could make it done easily?
I *think* the OS you're asking about is SVR3-based. In which case there
is no reasonable way to expand the kernel stack, so you must mend your
ways. Don't consume so much stack. Avoid large local variables. Avoid
true recursion (if you *must* recurse, do it with a loop and a
software-maintained stack). Use kmem_alloc() if it's available.
> Newsgroups: comp.unix.programmer,bit.listserv.banyan-l,comp.unix.sco.programmer,comp.unix.sys5.misc,comp.unix.sys5.r3,comp.unix.sys5.r4,comp.unix.sysv386,comp.unix.solaris
This is way too many newsgroups. Is it an SVR3 or SVR4 kernel? Post to
that group, not the other, not misc, not the really generic groups like
comp.unix.programmer. If it is SVR3-based that you might be right to
post to comp.unix.sco.programmer; if it's SVR4-based then the solaris
group might be appropriate.
>Bela<
--
Sandy & Bela Lubkin are traveling around the world for a year! Telecommuting
from Edinburgh, Scotland; Ireland next. +Please do not Cc: me on news posts!
Our stories and pictures are at: http://www.armory.com/~alexia/trip/trip.html
Using static variables would be a very bad idea in kernel software.
Try to alllocate dynamic memory on demand.
>Joerg Schilling wrote:
>>
>> In article <3496CC94...@activetouch.com>,
>> Joss Shen <s...@activetouch.com> wrote:
>> >Hi there,
>> >
>> >I'm doing a big network driver under Banyan Vines 7.0 (derived from AT&T
>> >SysV source tree). My problem is: the default 4K stack size is too small
>> >to my driver, how can i expand it to e.g. 8Kb? Is there any tunable
>> >parameter could make it done easily?
>>
>> Modify your driver so that it does not have too much local (automatic) vars
>> inside the functions. I cannot believe that the 4k limit is is reached because
>> of recursion or procedure calls.