Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

pprof memory heap #18

Open
vipulsaluja opened this issue Sep 6, 2016 · 0 comments
Open

pprof memory heap #18

vipulsaluja opened this issue Sep 6, 2016 · 0 comments

Comments

@vipulsaluja
Copy link

vipulsaluja commented Sep 6, 2016

I tried https://golang.org/pkg/net/http/pprof/ on my project and it is showing multiple entries for zxcvbn library.

Below are some instances from /debug/pprof/heap

2: 3407872 [2: 3407872] @ 0x417259 0x4160d9 0x92cb7a 0x92e0b7 0x92dbbb 0x9306b0 0x7db232 0x53052e 0x40b0d2 0x43c8fd 0x46bd51
0x92cb7a github.com/nbutton23/zxcvbn-go/matching.buildRankedDict+0x13a D:/Project/src/github.com/nbutton23/zxcvbn-go/matching/dictionaryMatch.go:50
0x92e0b7 github.com/nbutton23/zxcvbn-go/matching.loadFrequencyList+0x137 D:/Project/src/github.com/nbutton23/zxcvbn-go/matching/matching.go:51
0x92dbbb github.com/nbutton23/zxcvbn-go/matching.init.1+0x1b D:/Project/src/github.com/nbutton23/zxcvbn-go/matching/matching.go:26
0x9306b0 github.com/nbutton23/zxcvbn-go/matching.init+0x60 D:/Project/src/github.com/nbutton23/zxcvbn-go/matching/spatialMatch.go:80
0x7db232 github.com/nbutton23/zxcvbn-go.init+0x42 D:/Project/src/github.com/nbutton23/zxcvbn-go/zxcvbn.go:19

1: 663552 [1: 663552] @ 0x41d552 0x75205e 0x7c3446 0x7c2228 0x7c4b61 0x7c2208 0x7c12cd 0x7c0df2 0xa0aa78 0xa0a658 0xa0ac6d 0x9306ab 0x7db232 0x53052e 0x40b0d2 0x43c8fd 0x46bd51
0x41d552 reflect.unsafe_NewArray+0x32 C:/Go/src/runtime/malloc.go:803
0x75205e reflect.MakeSlice+0x23e C:/Go/src/reflect/value.go:2044
0x7c3446 encoding/json.(_decodeState).array+0x896 C:/Go/src/encoding/json/decode.go:507
0x7c2228 encoding/json.(_decodeState).value+0x3c8 C:/Go/src/encoding/json/decode.go:364
0x7c4b61 encoding/json.(_decodeState).object+0x1171 C:/Go/src/encoding/json/decode.go:684
0x7c2208 encoding/json.(_decodeState).value+0x3a8 C:/Go/src/encoding/json/decode.go:367
0x7c12cd encoding/json.(*decodeState).unmarshal+0x19d C:/Go/src/encoding/json/decode.go:168
0x7c0df2 encoding/json.Unmarshal+0x132 C:/Go/src/encoding/json/decode.go:96
0xa0aa78 github.com/nbutton23/zxcvbn-go/frequency.GetStringListFromAsset+0xb8 D:/Project/src/github.com/nbutton23/zxcvbn-go/frequency/frequency.go:41
0xa0a658 github.com/nbutton23/zxcvbn-go/frequency.init.1+0x338 D:/Project/src/github.com/nbutton23/zxcvbn-go/frequency/frequency.go:25
0xa0ac6d github.com/nbutton23/zxcvbn-go/frequency.init+0x9d D:/Project/src/github.com/nbutton23/zxcvbn-go/frequency/frequency.go:47
0x9306ab github.com/nbutton23/zxcvbn-go/matching.init+0x5b D:/Project/src/github.com/nbutton23/zxcvbn-go/matching/spatialMatch.go:80
0x7db232 github.com/nbutton23/zxcvbn-go.init+0x42 D:/Project/src/github.com/nbutton23/zxcvbn-go/zxcvbn.go:19

1: 663552 [1: 663552] @ 0x41d552 0x75205e 0x7c3446 0x7c2228 0x7c4b61 0x7c2208 0x7c12cd 0x7c0df2 0xa0aa78 0xa0a721 0xa0ac6d 0x9306ab 0x7db232 0x53052e 0x40b0d2 0x43c8fd 0x46bd51
0x41d552 reflect.unsafe_NewArray+0x32 C:/Go/src/runtime/malloc.go:803
0x75205e reflect.MakeSlice+0x23e C:/Go/src/reflect/value.go:2044
0x7c3446 encoding/json.(_decodeState).array+0x896 C:/Go/src/encoding/json/decode.go:507
0x7c2228 encoding/json.(_decodeState).value+0x3c8 C:/Go/src/encoding/json/decode.go:364
0x7c4b61 encoding/json.(_decodeState).object+0x1171 C:/Go/src/encoding/json/decode.go:684
0x7c2208 encoding/json.(_decodeState).value+0x3a8 C:/Go/src/encoding/json/decode.go:367
0x7c12cd encoding/json.(*decodeState).unmarshal+0x19d C:/Go/src/encoding/json/decode.go:168
0x7c0df2 encoding/json.Unmarshal+0x132 C:/Go/src/encoding/json/decode.go:96
0xa0aa78 github.com/nbutton23/zxcvbn-go/frequency.GetStringListFromAsset+0xb8 D:/Project/src/github.com/nbutton23/zxcvbn-go/frequency/frequency.go:41
0xa0a721 github.com/nbutton23/zxcvbn-go/frequency.init.1+0x401 D:/Project/src/github.com/nbutton23/zxcvbn-go/frequency/frequency.go:26
0xa0ac6d github.com/nbutton23/zxcvbn-go/frequency.init+0x9d D:/Project/src/github.com/nbutton23/zxcvbn-go/frequency/frequency.go:47
0x9306ab github.com/nbutton23/zxcvbn-go/matching.init+0x5b D:/Project/src/github.com/nbutton23/zxcvbn-go/matching/spatialMatch.go:80
0x7db232 github.com/nbutton23/zxcvbn-go.init+0x42 D:/Project/src/github.com/nbutton23/zxcvbn-go/zxcvbn.go:19

2: 416 [3: 624] @ 0x415e91 0x92cb7a 0x92e0b7 0x92dbbb 0x9306b0 0x7db232 0x53052e 0x40b0d2 0x43c8fd 0x46bd51
0x92cb7a github.com/nbutton23/zxcvbn-go/matching.buildRankedDict+0x13a D:/Project/src/github.com/nbutton23/zxcvbn-go/matching/dictionaryMatch.go:50
0x92e0b7 github.com/nbutton23/zxcvbn-go/matching.loadFrequencyList+0x137 D:/Project/src/github.com/nbutton23/zxcvbn-go/matching/matching.go:51
0x92dbbb github.com/nbutton23/zxcvbn-go/matching.init.1+0x1b D:/Project/src/github.com/nbutton23/zxcvbn-go/matching/matching.go:26
0x9306b0 github.com/nbutton23/zxcvbn-go/matching.init+0x60 D:/Project/src/github.com/nbutton23/zxcvbn-go/matching/spatialMatch.go:80
0x7db232 github.com/nbutton23/zxcvbn-go.init+0x42 D:/Project/src/github.com/nbutton23/zxcvbn-go/zxcvbn.go:19

1: 16 [1: 16] @ 0x4532ce 0x453156 0x7c6c9f 0x7c5360 0x7c21e2 0x7c3622 0x7c2228 0x7c4b61 0x7c2208 0x7c12cd 0x7c0df2 0xa0aa78 0xa0a7e7 0xa0ac6d 0x9306ab 0x7db232 0x53052e 0x40b0d2 0x43c8fd 0x46bd51
0x7c6c9f encoding/json.(_decodeState).literalStore+0x14ef C:/Go/src/encoding/json/decode.go:833
0x7c5360 encoding/json.(_decodeState).literal+0xf0 C:/Go/src/encoding/json/decode.go:717
0x7c21e2 encoding/json.(_decodeState).value+0x382 C:/Go/src/encoding/json/decode.go:370
0x7c3622 encoding/json.(_decodeState).array+0xa72 C:/Go/src/encoding/json/decode.go:518
0x7c2228 encoding/json.(_decodeState).value+0x3c8 C:/Go/src/encoding/json/decode.go:364
0x7c4b61 encoding/json.(_decodeState).object+0x1171 C:/Go/src/encoding/json/decode.go:684
0x7c2208 encoding/json.(_decodeState).value+0x3a8 C:/Go/src/encoding/json/decode.go:367
0x7c12cd encoding/json.(_decodeState).unmarshal+0x19d C:/Go/src/encoding/json/decode.go:168
0x7c0df2 encoding/json.Unmarshal+0x132 C:/Go/src/encoding/json/decode.go:96
0xa0aa78 github.com/nbutton23/zxcvbn-go/frequency.GetStringListFromAsset+0xb8 D:/Project/src/github.com/nbutton23/zxcvbn-go/frequency/frequency.go:41
0xa0a7e7 github.com/nbutton23/zxcvbn-go/frequency.init.1+0x4c7 D:/Project/src/github.com/nbutton23/zxcvbn-go/frequency/frequency.go:27
0xa0ac6d github.com/nbutton23/zxcvbn-go/frequency.init+0x9d D:/Project/src/github.com/nbutton23/zxcvbn-go/frequency/frequency.go:47
0x9306ab github.com/nbutton23/zxcvbn-go/matching.init+0x5b D:/Project/src/github.com/nbutton23/zxcvbn-go/matching/spatialMatch.go:80
0x7db232 github.com/nbutton23/zxcvbn-go.init+0x42 D:/Project/src/github.com/nbutton23/zxcvbn-go/zxcvbn.go:19

0: 0 [2: 262144] @ 0x44ed58 0x44ea4e 0x92cdf2 0x92dd4e 0x7db01f 0x52e0f8 0x53034d 0x632233 0x4bc551 0x630f5b 0x636522 0x4bc551 0x40a3d9 0x4bc551 0x4be875 0x4bb265 0x46bd51
0x92cdf2 github.com/nbutton23/zxcvbn-go/matching.l33tMatch+0x232 D:/Project/src/github.com/nbutton23/zxcvbn-go/matching/leet.go:19
0x92dd4e github.com/nbutton23/zxcvbn-go/matching.Omnimatch+0x17e D:/Project/src/github.com/nbutton23/zxcvbn-go/matching/matching.go:42
0x7db01f github.com/nbutton23/zxcvbn-go.PasswordStrength+0xaf D:/Project/src/github.com/nbutton23/zxcvbn-go/zxcvbn.go:12

And each time I use library to calculate entropy of password, the heap count is growing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant