Thread View: comp.unix.programmer
4 messages
4 total messages
Started by Joss Shen
Tue, 16 Dec 1997 00:00
Q: How can i expand the stack size from 4K to 8K in kernel driver?
Author: Joss Shen
Date: Tue, 16 Dec 1997 00:00
Date: Tue, 16 Dec 1997 00:00
10 lines
1502 bytes
1502 bytes
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? Thanks in advance! Joss
Re: Q: How can i expand the stack size from 4K to 8K in kernel driver?
Author: Joerg Schilling
Date: Wed, 17 Dec 1997 00:00
Date: Wed, 17 Dec 1997 00:00
21 lines
2122 bytes
2122 bytes
In article <3496CC94.79F5CCA@activetouch.com>,
Joss Shen <sj@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.
Joerg
--
EMail:joerg@schily.isdn.cs.tu-berlin.de (home) J�rg Schilling D-13353 Berlin
js@cs.tu-berlin.de (uni) If you don't have iso-8859-1
jes@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
Re: Q: How can i expand the stack size from 4K to 8K in kernel driver?
Author: Bela Lubkin
Date: Thu, 18 Dec 1997 00:00
Date: Thu, 18 Dec 1997 00:00
28 lines
2676 bytes
2676 bytes
Joss Shen wrote: > 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
Re: Q: How can i expand the stack size from 4K to 8K in kernel driver?
Author: Joerg Schilling
Date: Thu, 18 Dec 1997 00:00
Date: Thu, 18 Dec 1997 00:00
32 lines
2757 bytes
2757 bytes
In article <34982C99.97199F5F@activetouch.com>,
Joss Shen <sj@activetouch.com> wrote:
>Hi,
>
>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.
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.79F5CCA@activetouch.com>,
>> Joss Shen <sj@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.
--
EMail:joerg@schily.isdn.cs.tu-berlin.de (home) J�rg Schilling D-13353 Berlin
js@cs.tu-berlin.de (uni) If you don't have iso-8859-1
jes@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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads