473,414 Members | 1,663 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

stack size limit ?


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)
--
Une Bévue
Jun 27 '08 #1
5 2157
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 ...?
The latest Webkit accepts a stack size of 5655 (on Mac OS X 10.4.11)
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jun 27 '08 #2
On Jun 4, 10:41*am, unbewusst.s...@weltanschauung.com.invalid (Une
Bévue) wrote:
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.
Jun 27 '08 #3
Evertjan. <ex**************@interxnl.netwrote:
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.
Or the mathmatical parser stack?

--
Une Bévue
Jun 27 '08 #4
Jorge <jo***@jorgechamorro.comwrote:
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 !

--
Une Bévue
Jun 27 '08 #5
[Sorry for posting the followup here, .invalid is filtered out]

Jorge wrote:
On Jun 4, 10:41 am, unbewusst.s...@weltanschauung.com.invalid (Une
Bévue) wrote:
>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
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
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8*******************@news.demon.co.uk>
Jun 27 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Kevin Grigorenko | last post by:
Hello, I couldn't find an obvious answer to this in the FAQ. My basic question, is: Is there any difference in allocating on the heap versus the stack? If heap or stack implementation is not...
11
by: Dan Elliott | last post by:
Hello all, I am writing a program which needs to run as quickly as possible, but holds a lot of data in memory (around 1GB for a usual run). Is this too much memory to even consider putting...
12
by: jimjim | last post by:
Hello, 1. As the subject sugests, are the objects created in the stack guarranted to have been created? 2. How can I verify this? (e.g. for objects created in the heap A *a = new A one can...
4
by: Victor | last post by:
Hello, I've got a situation in which the number of (valid) recursive calls I make will cause stack overflow. I can use getrlimit (and setrlimit) to test (and set) my current stack size. ...
2
by: Peter Oliphant | last post by:
Hey, is there a limit to the stack size? I realize of course there must be, but how is this determined/set? Or does it self adjust up to, say, available memory (and possibly virtual memory from...
8
by: gypsy3001 | last post by:
I inherited some code and got a segmentation fault on the following line: unsigned short localImage; It's really baffling and I can't think of what could cause this problem. The following are...
1
by: alfie27 | last post by:
I currently have a working program that is a stack that stores integers. Now i have to convert it to store strings instead of integers. I have been working on this for hours and just keep getting...
13
by: deepak | last post by:
Hi In the following function how the memory 'll be allocated. 1) Will it allocate memory for all the char's together or allocate for first char. then for int then for float and after this only...
11
by: Nehil | last post by:
I would like to know which is dynamic in nature. if i refer the C memory model (Richard Steven), it is shown that both stack and heap grow towards each other. Now, can one go into other's area and...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.