GitHub - Data-Wrangling-with-JavaScript/nodejs-memory-test: Code to test how much memory is available with Node.js | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Data-Wrangling-with-JavaScript/nodejs-memory-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nodejs-memory-test

A test program to estimate how much heap memory is available to a Node.js application.

This example code accompanies the book Data Wrangling with JavaScript.

There is also a related blog post and video.

You can support my work here


If you're a JavaScript developer, you already know that working with data is a big deal. Why let the Python and R coders get all the glory? JavaScript isn't just good at data visualization, you can move your entire data wrangling pipeline to JavaScript and work more effectively. Data Wrangling with JavaScript teaches you core data munging techniques in JavaScript, along with many libraries and tools that will make your data tasks even easier.

Setup

Clone the repo to your local hard drive and change directory to the repo.

No dependencies are required.

Run

To determine the largest amount of memory that can be allocated in Node.js run:

node index.js

Let this run for a while and it will eventually abort with a fatal out of memory error like this:

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

The last line of text printed tells you the total amount of heap memory available to your application under Node.js.

Now try increasing heap memory, add the '--max-old-space-size' command line parameter as follows and run it again:

node --max-old-space-size=6000 index.js

You should now have much more heap memory to play with!

About

Code to test how much memory is available with Node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.