Javascript Memory Limit

R

raphpell

Hi,

I reached Javascript memory limit in all browser ( IE, Firefox,
Chrome, Opera, ...). Is there an issue ?
 
E

Erwin Moller

raphpell schreef:
Hi,

I reached Javascript memory limit in all browser ( IE, Firefox,
Chrome, Opera, ...). Is there an issue ?

Hi,

I advise you to buy 8.000.000 Gigs extra and plug them into your computer.
You might want to consider to develop a new OS that can address that
much memory.
Maybe that helps. Not sure.

If the above doesn't help, please post the sourcecode of your new OS in
here so we can have a look at it.

Regards,
Erwin Moller

--
"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies, and the
other way is to make it so complicated that there are no obvious
deficiencies. The first method is far more difficult."
-- C.A.R. Hoare
 
D

Doug Gunnoe

Hi,

I reached Javascript memory limit in all browser ( IE, Firefox,
Chrome, Opera, ...). Is there an issue ?

I think there might be an issue.

You appear to be reaching the memory limit in all the browsers.
 
D

Dr J R Stockton

In comp.lang.javascript message <49778665-56b9-4190-8e29-ee0624086ed0@h2
3g2000vbc.googlegroups.com>, Sat, 30 May 2009 08:30:56, raphpell
I reached Javascript memory limit in all browser ( IE, Firefox,
Chrome, Opera, ...). Is there an issue ?


It would he helpful if you were to post in French, in which you would
clearly be able to express yourself more elegantly and in more detail.
You can put an "English" version for those of the less well educated who
have not yet discovered Google Translate; and you can ignore complaints
from the uncouth.


ISTM that there are two (or more) limits to consider.

In a given implementation of JavaScript, there will be limits on the
number and size of objects due to internal addressing using numbers of
limited length (that's not a requirement, but it is to be expected;
those numbers could well be 16- or 32-bit).


And in a given host system, there will be a limit on the amount of
actual RAM which your JavaScript can be given. If more is needed, RAM
will be swapped in and out from disc; and your code will then probably
become unacceptably slow.

I have, in estrcons.htm, a section that calculated repeats of Gregorian
Easter date sequences - for example, 1948-2047 repeats 2100-2199,
1498-3600 repeats 427098-429200. Ideally, I'd check over, say,
5,720,000 years. For efficiency, one needs an array of the date (of
March) of Easter for all years covered, and a quantity of other arrays
to keep track of what has been found. The present code works well for
600,000 years; but above that, thrashing sets in.


In the first case, the JavaScript system should give a definite error
message and quit. It cannot be reasonably expected, in the second case,
to recognise when to give up.

It's a good idea to read the newsgroup c.l.j and its FAQ. See below.
 
L

Lasse Reichstein Nielsen

Dr J R Stockton said:
ISTM that there are two (or more) limits to consider.

In a given implementation of JavaScript, there will be limits on the
number and size of objects due to internal addressing using numbers of
limited length (that's not a requirement, but it is to be expected;
those numbers could well be 16- or 32-bit).
And in a given host system, there will be a limit on the amount of
actual RAM which your JavaScript can be given. If more is needed, RAM
will be swapped in and out from disc; and your code will then probably
become unacceptably slow.

A thirds limit is the stack size. Nesting function calls too deep
(typically by a mistakenly limitless recursion) will exhaust the stack
and force the program to stop. This might be reported as an
out-of-memory condition.
This is more likely to happen than either of the other two (as you say,
the program will likely crawl to a halt before exhausting available heap
memory).

A fourth possibility is a limit on the size of a single object or
value. An attempt to create one can also be reported as an
out-of-memory condition, saying, efficiently "there isn't enough
free space for *that*". This can also happen when creating a very
large string, even if the internal representation doesn't take up
that much memory. E.g.:

var x = "x";
for (var i = 0; i < 32; i++) { x = x + x;}
alert(x.length);

/L
 
R

raphpell

Merci beaucoup,
Je voulais dire, "J'ai écrit un programme sans bug, mais après pas mal
de clique, quelques objets et fonctions ont disparu...
Pas d'exception n'a été lancé par les navigateurs."

Ce n'est pas dû à la :
1. taille limite d'un objet ou d'une valeur ( quoique, quel objet ? )
2. taille de la pile ( see the stack overflow error )
3. limite de RAM disponible

C'est probablement dû à une limite en nombre et en taille d'objet,
mais je n'ai trouvé aucune information dessus. Je pense qu'au moins
une erreur devrais être lancé par les navigateurs.
Mes meilleures salutations.

Désolé pour mes difficultés en français !

Thanks a lot,
I wanted to say "I wrote a program with no bugs, but after a lot of
click, some objects or functions have disappeared...
No exception was throwed by navigators."

It was not due to the :
1. limit on the size of a single object or value ( What's up dock,
bugs bunny )
2. stack size
3. limit on the amount of RAM.

It's probably due to a limit on the number and size of objects but I
found anything about it. I guess that navigators will throw an error
when it occurs.
My best regards.

Sorry for my little english...
 
R

raphpell

.... it was a simple script error... merci pour tout.
It was my stupid implementation of the function waitObject.
Thanks.
 

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
474,100
Messages
2,570,635
Members
47,241
Latest member
HumbertoSt

Latest Threads

Top