aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2019-05-22 18:26:29 +0200
committerSverker Eriksson <[email protected]>2019-05-22 18:26:29 +0200
commit09c228160d95f10a383e3495b02ac8645b497009 (patch)
tree5ff95b793b3d33cb0480cf1f41deb524a16d0ff7 /lib
parentfb165b251edd004e214f3ea842217a5860f317ac (diff)
parent2064fb7c9ff2d2eecabed0999c56614524f0c16b (diff)
downloadotp-09c228160d95f10a383e3495b02ac8645b497009.tar.gz
otp-09c228160d95f10a383e3495b02ac8645b497009.tar.bz2
otp-09c228160d95f10a383e3495b02ac8645b497009.zip
Merge branch 'maint'
Diffstat (limited to 'lib')
-rw-r--r--lib/stdlib/doc/src/binary.xml15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/stdlib/doc/src/binary.xml b/lib/stdlib/doc/src/binary.xml
index f3d4edd30f..fd991f258b 100644
--- a/lib/stdlib/doc/src/binary.xml
+++ b/lib/stdlib/doc/src/binary.xml
@@ -505,15 +505,16 @@ store(Binary, GBSet) ->
&lt;&lt;1,1,1,1,1 ...
2> byte_size(A).
100
-3> binary:referenced_byte_size(A)
+3> binary:referenced_byte_size(A).
100
-4> &lt;&lt;_:10/binary,B:10/binary,_/binary&gt;&gt; = A.
+4> &lt;&lt;B:10/binary, C:90/binary&gt;&gt; = A.
&lt;&lt;1,1,1,1,1 ...
-5> byte_size(B).
-10
-6> binary:referenced_byte_size(B)
-100</code>
-
+5> {byte_size(B), binary:referenced_byte_size(B)}.
+{10,10}
+6> {byte_size(C), binary:referenced_byte_size(C)}.
+{90,100}</code>
+ <p>In the above example, the small binary <c>B</c> was copied while the
+ larger binary <c>C</c> references binary <c>A</c>.</p>
<note>
<p>Binary data is shared among processes. If another process
still references the larger binary, copying the part this