what is the minimum RAM required for running v8 java-script engine.
Is it suitable for limited memory devices. I want to use node.js as embedded sever in android application. Is it a good idea?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
V8 requests memory for the JavaScript heap in 1 MB chunks called pages. These are grouped in spaces which contain different kinds of objects. There are 7 spaces (from, to, pointer, data, code, cell, map), or 8 if you count large object spac. At absolute minimum you need at least one page per space, so that’s 7 MB right there. V8 itself is about 3 MB (at least on ARM, YMMV). Plus, you’d need another 2 MB or so for scratch space. So that’s 12 MB in total, at minimum. You’d probably want to have 20-30 MB available in total for normal operation.
All this should fit easily on any Android device. All devices I know of have at least 256 MB of RAM, and you can expect the OS and other apps to use at least half of that. Note that the Android web browser already embeds V8 and has no trouble. The browser’s instance of V8 likely has a larger memory footprint than the V8 portion of a Node.js server.