Not able to calculate memory for Map object #1

Open
opened 2016-03-28 03:34:55 -07:00 by abhirocks550 · 1 comment
abhirocks550 commented 2016-03-28 03:34:55 -07:00 (Migrated from github.com)

var myMap = new Map();

for(var i=0 ; i<10000;i++)
{
myMap.set(name+i, "value associated with 'a string'");
}
console.log(sizeof(myMap));

it is showing size as 0.

Can someone help ?

var myMap = new Map(); for(var i=0 ; i<10000;i++) { myMap.set(name+i, "value associated with 'a string'"); } console.log(sizeof(myMap)); it is showing size as 0. Can someone help ?
andyburke commented 2016-03-28 14:36:54 -07:00 (Migrated from github.com)

The library was created to work on basic js types. There probably needs to be special case handling for the newer Map object. I would welcome a pull request adding functionality to calculate the size of Map objects.

The library was created to work on basic js types. There probably needs to be special case handling for the newer Map object. I would welcome a pull request adding functionality to calculate the size of Map objects.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
andyburke/js-sizeof#1
No description provided.