diff options
author | Lukas Larsson <[email protected]> | 2016-02-18 13:52:54 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2016-04-07 09:54:14 +0200 |
commit | 57551877d85ad7659201235e27498be42809fefb (patch) | |
tree | d510785967a851f39150331f81da2b3b33b4b87f /erts/doc/src/erl_nif.xml | |
parent | 3f190b62031783ad4fc9bb1fb91703a1b1b40ad7 (diff) | |
download | otp-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/erl_nif.xml')
-rw-r--r-- | erts/doc/src/erl_nif.xml | 4 |
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, &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, &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 |