size icon indicating copy to clipboard operation
size copied to clipboard

The size of variable at runtime

Results 4 size issues
Sort by recently updated
recently updated
newest added

Not sure if client code should implement the right locking or this can be done in this package. ``` fatal error: concurrent map read and map write goroutine 17031842 [running]:...

cnt := 1000 ss := make([][]string, cnt, cnt) // len = cap = 1000 s := make([]string, 1, 1) // len = cap = 1 : slice header = 24...

If you have a struct ``` struct { a, b []int } ``` and you set `mystruct.a = []int{1,2,3, ...., 100000}` and `mystruct.b = mystruct.a`, then the memory taken by...