Skip to content

520MianXiangDuiXiang520/MapSize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MapSize

How much memory is occupied by map.

go get github.com/520MianXiangDuiXiang520/MapSize
package main

import (
	"fmt"
	"github.com/520MianXiangDuiXiang520/MapSize"
)

func main() {
	m := make(map[int]struct{})
	for i := 0; i < 100; i++ {
		m[i] = struct{}{}
	}
	fmt.Println(mapsize.Size(m)) // 1416
}

About

How much memory is occupied by map.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages