Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0de34db

Browse files
committed
Clarify OS level Zero Copy
1 parent 7fcabd1 commit 0de34db

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ch1-overview.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ Netty那点事(一)概述
105105
* Zero-Copy-Capable Rich Byte Buffer
106106

107107
零拷贝的Buffer。为什么叫零拷贝?因为在数据传输时,最终处理的数据会需要对单个传输层的报文,进行组合或者拆分。NIO原生的ByteBuffer无法做到这件事,而Netty通过提供Composite(组合)和Slice(切分)两种Buffer来实现零拷贝。这部分代码在`org.jboss.netty.buffer`包中。
108+
这里需要额外注意,不要和操作系统级别的Zero-Copy混淆了, 操作系统中的零拷贝主要是用户空间和内核空间之间的数据拷贝, NIO中通过DirectBuffer做了实现.
108109

109110
* Universal Communication API
110111

@@ -121,4 +122,4 @@ Netty那点事(一)概述
121122
* What is Netty? [http://ayedo.github.io/netty/2013/06/19/what-is-netty.html](http://ayedo.github.io/netty/2013/06/19/what-is-netty.html)
122123

123124
[1]: http://static.oschina.net/uploads/space/2013/0921/174032_18rb_190591.png
124-
[2]: http://static.oschina.net/uploads/space/2013/0921/225721_R0w2_190591.png
125+
[2]: http://static.oschina.net/uploads/space/2013/0921/225721_R0w2_190591.png

0 commit comments

Comments
 (0)