Skip to content

Commit

Permalink
cgofuse/lock: lint - struct alignment
Browse files Browse the repository at this point in the history
This shouldn't change the size of the struct, but it does reduce the
pointer bytes inspected by the garbage collector by half*.
*at least on amd64 when using `gc`
  • Loading branch information
djdv committed Jun 21, 2023
1 parent 6221424 commit 59d9f60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/filesystem/cgofuse/lock/lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ type (
// PathLocker is a hierarchical path locker,
// inspired by Ritik Malhotra's paper on path-based locks.
PathLocker struct {
lockTableMu sync.Mutex
lockTable pathLockerMap
lockTableMu sync.Mutex
}
// UnlockFunc must be called after an operation completes.
// Typically a single defer statement is used
Expand Down

0 comments on commit 59d9f60

Please sign in to comment.