Skip to content

Commit

Permalink
docs: clearer doc for linkBufferNode mode (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
gh-liu committed May 16, 2024
1 parent 37e4d10 commit a9a224c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions nocopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,12 @@ const (
minReuseBytes = 64 // only reuse bytes if n >= minReuseBytes

defaultLinkBufferMode = 0
// readonly mode indicate that the buffer node memory is not controlled by itself,
// so we cannot reuse the buffer or nocopy read it, default value is false.
// readonlyMask is used to set readonly mode,
// which indicate that the buffer node memory is not controlled by itself,
// so we cannot reuse the buffer or nocopy read it.
readonlyMask uint8 = 1 << 0 // 0000 0001
// nocopyRead mode indicate that the buffer node has been no copy read and cannot reuse the buffer, default value is false.
// readonlyMask is used to set nocopyRead mode,
// which indicate that the buffer node has been no copy read and cannot reuse the buffer.
nocopyReadMask uint8 = 1 << 1 // 0000 0010
)

Expand Down

0 comments on commit a9a224c

Please sign in to comment.