stack size limit ?

U

Une Bévue

does exist a constant in JavScript (UA dependent) telling us the stack
size limit ?

from google I've found 1000 for Firefox, 100 for Safari 3
verified experimetally

The latest Webkit accepts a stack size of 5655 (on Mac OS X 10.4.11)
 
E

Evertjan.

Une Bév ue wrote on 04 jun 2008 in comp.lang.javascript:
does exist a constant in JavScript (UA dependent) telling us the stack
size limit ?

from google I've found 1000 for Firefox, 100 for Safari 3
verified experimetally

There are many stacks [li-fo memory] in JS.

Do you mean the subroutine/function stack?
This was discussed here in this NG recently for recursion.

Or the mathmatical parser stack?

Or ...?
 
J

Jorge

does exist a constant in JavScript (UA dependent) telling us the stack
size limit ?

Nope, I don't think so.
from google I've found 1000 for Firefox, 100 for Safari 3
verified experimetally

The latest Webkit accepts a stack size of 5655 (on Mac OS X 10.4.11)

javascript:(function f(p){document.write(p+'<br>'); f(p+1); })(0)

Betas:

WebKit/Safari r34088 --> 139808 (!)
FF3.0pre --> 2999
IE8.0.6001 --> 2340

Non-betas:

Safari 3.1.1 --> 498
FF2 --> 999
IE 7.0.5730.11 --> 2507
Opera 9.27 --> 3328

cljs thread : "Javascript recursion limit"

--Jorge.
 
U

Une Bévue

Evertjan. said:
There are many stacks [li-fo memory] in JS.

Do you mean the subroutine/function stack?
This was discussed here in this NG recently for recursion.

subroutine/function stack.
 
U

Une Bévue

Jorge said:
javascript:(function f(p){document.write(p+'<br>'); f(p+1); })(0)

Betas:

WebKit/Safari r34088 --> 139808 (!)
FF3.0pre --> 2999
IE8.0.6001 --> 2340

Non-betas:

Safari 3.1.1 --> 498
FF2 --> 999
IE 7.0.5730.11 --> 2507
Opera 9.27 --> 3328

cljs thread : "Javascript recursion limit"

--Jorge.

thanks for the tips !
 
T

Thomas 'PointedEars' Lahn

[Sorry for posting the followup here, .invalid is filtered out]
javascript:(function f(p){document.write(p+'<br>'); f(p+1); })(0)

Betas:

WebKit/Safari r34088 --> 139808 (!)
FF3.0pre --> 2999
IE8.0.6001 --> 2340

Non-betas:

Safari 3.1.1 --> 498
FF2 --> 999
IE 7.0.5730.11 --> 2507
Opera 9.27 --> 3328

However, in most cases the stack size would _not_ equal the number of
recursions a stack can support:

http://en.wikipedia.org/wiki/Call_stack#Structure


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top