aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc/src
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2016-02-18 13:52:54 +0100
committerLukas Larsson <[email protected]>2016-04-07 09:54:14 +0200
commit57551877d85ad7659201235e27498be42809fefb (patch)
treed510785967a851f39150331f81da2b3b33b4b87f /erts/doc/src
parent3f190b62031783ad4fc9bb1fb91703a1b1b40ad7 (diff)
downloadotp-57551877d85ad7659201235e27498be42809fefb.tar.gz
otp-57551877d85ad7659201235e27498be42809fefb.tar.bz2
otp-57551877d85ad7659201235e27498be42809fefb.zip
erts: Add enif_send with NULL as msg env
This is an optimization for reducing the number of heap fragments allocated when sending a message where the majority of the message payload is on the sending process' heap.
Diffstat (limited to 'erts/doc/src')
-rw-r--r--erts/doc/src/erl_nif.xml4
1 files changed, 3 insertions, 1 deletions
diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml
index 1e95634d1b..1bfd98f664 100644
--- a/erts/doc/src/erl_nif.xml
+++ b/erts/doc/src/erl_nif.xml
@@ -1632,7 +1632,7 @@ enif_map_iterator_destroy(env, &amp;iter);
<tag><c>msg_env</c></tag>
<item>The environment of the message term. Must be a process
independent environment allocated with
- <seealso marker="#enif_alloc_env">enif_alloc_env</seealso>.</item>
+ <seealso marker="#enif_alloc_env">enif_alloc_env</seealso> or NULL.</item>
<tag><c>msg</c></tag>
<item>The message term to send.</item>
</taglist>
@@ -1641,6 +1641,8 @@ enif_map_iterator_destroy(env, &amp;iter);
<c>msg</c>) will be invalidated by a successful call to <c>enif_send</c>. The environment
should either be freed with <seealso marker="#enif_free_env">enif_free_env</seealso>
of cleared for reuse with <seealso marker="#enif_clear_env">enif_clear_env</seealso>.</p>
+ <p>If <c>msg_env</c> is set to NULL the <c>msg</c> term is copied and
+ the original term and its environemt is still valid after the call.</p>
<p>This function is only thread-safe when the emulator with SMP support is used.
It can only be used in a non-SMP emulator from a NIF-calling thread.</p>
<note><p>Passing <c>msg_env</c> as <c>NULL</c> is only supported since