Optimize padding on Piece
This commit is contained in:
parent
c2ba2aa417
commit
808fd4b382
2
piece.go
2
piece.go
|
@ -48,8 +48,8 @@ type Piece struct {
|
|||
// length can be determined by the request chunkSize in use.
|
||||
_dirtyChunks bitmap.Bitmap
|
||||
|
||||
hashing bool
|
||||
numVerifies int64
|
||||
hashing bool
|
||||
storageCompletionOk bool
|
||||
|
||||
publicPieceState PieceState
|
||||
|
|
|
@ -6,5 +6,7 @@ import (
|
|||
)
|
||||
|
||||
func TestPieceSize(t *testing.T) {
|
||||
t.Logf("%v", unsafe.Sizeof(Piece{}))
|
||||
t.Log("[]*File", unsafe.Sizeof([]*File(nil)))
|
||||
t.Log("Piece", unsafe.Sizeof(Piece{}))
|
||||
t.Log("map[*peer]struct{}", unsafe.Sizeof(map[*peer]struct{}(nil)))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue