running out of memory

lemouton's icon

Hi,

Is it possible to increase the memory allocated for javascript ?
I get this "out of memory" error whenever I am trying to load a big (1Mo) text file into a javascript string.

Or should I switch to another programming language ?

Johnny Christ's icon

No - user-allocation of memory to one process or another (let alone a programming lang?) is not a feature of modern OSes, thank $deity.

Peter Castine's icon

You would probably be better off to handle your text file as an array of Strings, allocating one line of text to each string. Or reading in a couple of kB at a time.