Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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