Welcome to the Linux Foundation Forum!

Lab 14.2 error?

  1. 'use strict'
  2. setTimeout(() => {
  3. console.log() // TODO output uptime of process
  4. console.log() // TODO output uptime of OS
  5. console.log() // TODO output total system memory
  6. console.log() // TODO output total process memory
  7. }, 1000)

for this exercise this particular line:

  1. console.log() // TODO output total process memory

throws an assertion error when I log

  1. process.memoryUsage().rss

Although it works when I use.

  1. process.memoryUsage().heapTotal

My understanding is that the heapTotal is not the total process memory.
I think that the rss includes heapTotal and external memory for both the V8 and c++ memory usage. While heapTotal only represents V8 memory usage.

Am I wrong or is there an error in the test?

Best Answer

  • Posts: 270
    Answer ✓

    hey @andrewpartrickmiller you're not wrong - I was using process in a slightly different (less correct) way to refer to just the JS portion. I've improved the wording by changing the word "process" to "heap". Thanks for the feedback Andrew!

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training