Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiling-J committed Aug 8, 2024
1 parent a632fb8 commit c8e972a
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions internal/buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,19 @@ type PolicyBuffers[K comparable, V any] struct {
//
// This implementation is striped to further increase concurrency.
type Buffer[K comparable, V any] struct {
head atomic.Uint64
headPadding [xruntime.CacheLineSize - unsafe.Sizeof(atomic.Uint64{})]byte
tail atomic.Uint64
tailPadding [xruntime.CacheLineSize - unsafe.Sizeof(atomic.Uint64{})]byte
returned unsafe.Pointer
returnedPadding [xruntime.CacheLineSize - 8]byte
policyBuffers unsafe.Pointer
returnedSlicePadding [xruntime.CacheLineSize - 8]byte
buffer [capacity]unsafe.Pointer
head atomic.Uint64
// headPadding
_ [xruntime.CacheLineSize - unsafe.Sizeof(atomic.Uint64{})]byte
tail atomic.Uint64
// tailPadding
_ [xruntime.CacheLineSize - unsafe.Sizeof(atomic.Uint64{})]byte
returned unsafe.Pointer
// returnedPadding
_ [xruntime.CacheLineSize - 8]byte
policyBuffers unsafe.Pointer
// returnedSlicePadding
_ [xruntime.CacheLineSize - 8]byte
buffer [capacity]unsafe.Pointer
}

// New creates a new lossy Buffer.
Expand Down

0 comments on commit c8e972a

Please sign in to comment.