Recursive functions

I’m tempted to use a recursive function. I’ve been
advised not to, due to the limit on size of the kernel
stack.

I know, the worsecase scenario might be around 10
calls. Is this too much?

Rajeev


Everything you always wanted to know about cars and bikes,now
at: http://in.autos.yahoo.com/cricket/tracker.html

You can always convert your code to tail form, in which case the size of the
stack is irrelevant. But in C that can be a bit of a pain to do, and the
resulting code may not look very pretty. :wink:

Alberto.

-----Original Message-----
From: Rajeev Rao [mailto:xxxxx@yahoo.co.in]
Sent: Wednesday, May 29, 2002 2:52 PM
To: NT Developers Interest List
Subject: [ntdev] Recursive functions

I’m tempted to use a recursive function. I’ve been
advised not to, due to the limit on size of the kernel
stack.

I know, the worsecase scenario might be around 10
calls. Is this too much?

Rajeev


Everything you always wanted to know about cars and bikes,now
at: http://in.autos.yahoo.com/cricket/tracker.html


You are currently subscribed to ntdev as: xxxxx@compuware.com
To unsubscribe send a blank email to %%email.unsub%%

The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it.

What is your stack frame size?
Is it really a proven worst case scenario?
Consider to post the event to worker thread or to DPC.

Max

----- Original Message -----
From: “Rajeev Rao”
To: “NT Developers Interest List”
Sent: Wednesday, May 29, 2002 10:51 PM
Subject: [ntdev] Recursive functions

> I’m tempted to use a recursive function. I’ve been
> advised not to, due to the limit on size of the kernel
> stack.
>
> I know, the worsecase scenario might be around 10
> calls. Is this too much?
>
> Rajeev
>
>
>
>
____________________________________________________________________

> Everything you always wanted to know about cars and bikes,now
> at: http://in.autos.yahoo.com/cricket/tracker.html
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>