ExamVeda
Login
Home
31
How many properties are available in a memory object?
Discuss
Answer & Solution
Answer: Option C
Solution:
There are a total of 3 memory objects namely :
1. jsHeapSizeLimit
2. totalJsHeapSize
3. usedJsHeapSize
32
What is a heap in JavaScript?
Discuss
Answer & Solution
Answer: Option B
Solution:
The heap is the collection of JavaScript objects that the interpreter keeps in resident memory.
33
What is the function of the memory object?
Discuss
Answer & Solution
Answer: Option C
Solution:
The memory object is a feature of Chrome that allows us to see the memory usage that Chrome is taking up while running our page.
34
What is the command to access the Heap size limit?
Discuss
Answer & Solution
Answer: Option B
Solution:
The command performance.memory. jsHeapSizeLimit is used to access the Heap size limit.
35
What is the purpose of garbage collection?
Discuss
Answer & Solution
Answer: Option D
Solution:
When the interpreter sees an object in the heap with no object references, it removes that object from the heap. This is called garbage collection.
36
What does the usedJsHeapSize property indicate?
Discuss
Answer & Solution
Answer: Option A
Solution:
The usedJsHeapSize property is the amount of memory that all of the current objects in the heap are using.
37
Which of the following property indicate the total size of heap?
Discuss
Answer & Solution
Answer: Option C
Solution:
The totalJsHeapSize is size of the heap including free space not used by objects.
38
What can be done to monitor the memory usage?
Discuss
Answer & Solution
Answer: Option A
Solution:
Profiling allows us to monitor our memory usage.
39
Which of the following gives the high level breakdown of memory usage?
Discuss
Answer & Solution
Answer: Option A
Solution:
Typing about:memory into the location bar brings up a page that gives a high-level breakdown of memory usage.
40
Which keyword must be used to get a more granular insight of the memory usage?
Discuss
Answer & Solution
Answer: Option B
Solution:
To get a more granular insight of the memory usage, we must type about:memory?verbose.