On Sep 21, 2012, at 02:18, Krowten wrote:
> Hi!
> How to use an 8 gb memory?
> ===
> var ph = [];
> while (true) {
> ph.push('7232985jkdjf');
> }
>
> node --trace-gc --max-old-space-size=8192 heaptest.js
>
> 31 ms: Scavenge 2.1 (35.0) -> 1.8 (36.0) MB, 0 ms [allocation failure].
> 33 ms: Scavenge 2.6 (36.0) -> 2.4 (36.0) MB, 0 ms [Runtime::PerformGC].
> .............
> 4641 ms: Mark-sweep 1067.6 (1102.0) -> 641.2 (675.6) MB, 752 ms
> [Runtime::PerformGC] [GC in old space requested].
> FATAL ERROR: JS Allocation failed - process out of memory
> --
> server >> ubuntu 64x
> node -p -e "process.arch" >> x64
> node -v >> v0.8.9
I get the same with nodejs 0.9.2 on 64-bit OS X 10.8.1.
But I think this is expected. According to this message:
https://groups.google.com/forum/?fromgroups=#!topic/nodejs/BQ5dSm8lITQ
you cannot use more than 1 GB of heap space. What you're setting with
--max-old-space-size is the size of memory that garbage could occupy before it
is garbage collected. Your test script does not create any garbage so there's
nothing to collect so this setting is not relevant in this test.
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en