-
Notifications
You must be signed in to change notification settings - Fork 29.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nodejs not allowing buffer size greater than 1GB on 64-bit architecture #4445
Comments
The documentation is correct. Are you asking for the rationale or ? |
If the doc is correct. Why it's not working when I am trying to allocate more than 1GB. I get RangeError. |
What version of node are you trying with? Is it a 64-bit executable? What platform are you on? FWIW creating a >1GB buffer works for me on Linux with 64-bit node v4.2.3 and v5.3.0. |
Okay, thanks.. I was testing that on aws ec2 with node v4.2.3. And I got why it wasn't working. My instance was having just 1GB memory.. So.. Sorry, I didn't notice that. |
From the documentation:
new Buffer(size)
'size' must be less than 1,073,741,824 bytes (1 GB) on 32-bit architectures or 2,147,483,648 bytes (2 GB) on 64-bit architectures. Otherwise, a RangeError is thrown.
The text was updated successfully, but these errors were encountered: