aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2010-09-06 11:01:33 +0200
committerPatrik Nyblom <[email protected]>2010-09-06 11:01:33 +0200
commitdf54b5134dc2270f94157fdf63e2f279c2c49382 (patch)
treea853c26e3cd6cd37bfe0eea81602ba061217dd51
parentac64f33f2baf717ce77337069d434d25c37d46cf (diff)
parent18e894d86292d580966ee36d8e10028f42d5f39b (diff)
downloadotp-df54b5134dc2270f94157fdf63e2f279c2c49382.tar.gz
otp-df54b5134dc2270f94157fdf63e2f279c2c49382.tar.bz2
otp-df54b5134dc2270f94157fdf63e2f279c2c49382.zip
Merge branch 'pan/nif-valgrind-leak/OTP-8806' into dev
* pan/nif-valgrind-leak/OTP-8806: Remove warning about experimental status of NIFs from erlang.xml Stop leaking memory in nif_SUITE:send* testcases
-rw-r--r--erts/doc/src/erl_nif.xml4
-rw-r--r--erts/doc/src/erlang.xml12
-rw-r--r--erts/emulator/test/nif_SUITE_data/nif_SUITE.c5
3 files changed, 13 insertions, 8 deletions
diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml
index 8e4d8130f5..27887cbdf6 100644
--- a/erts/doc/src/erl_nif.xml
+++ b/erts/doc/src/erl_nif.xml
@@ -4,7 +4,7 @@
<cref>
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -1130,7 +1130,7 @@ typedef enum {
</funcs>
<section>
<title>SEE ALSO</title>
- <p><seealso marker="erlang#load_nif-2">load_nif(3)</seealso></p>
+ <p><seealso marker="erlang#load_nif-2">erlang:load_nif/2</seealso></p>
</section>
</cref>
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index cd3bcd3a07..ce7fde05d9 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -2034,12 +2034,14 @@ os_prompt%</pre>
<v>Text = string()</v>
</type>
<desc>
- <warning>
- <p>This BIF is still an experimental feature. The interface
- may be changed in any way in future releases.</p><p>In
- R13B03 the return value on failure was
+ <note>
+ <p>In releases older than OTP R14B, NIF's where an
+ experimental feature. Versions of OTP older than R14B might
+ have different and possibly incompatible NIF semanticts and
+ interfaces. For example, in R13B03 the return value on
+ failure was
<c>{error,Reason,Text}</c>.</p>
- </warning>
+ </note>
<p>Loads and links a dynamic library containing native
implemented functions (NIFs) for a module. <c>Path</c> is a
file path to the sharable object/dynamic library file minus
diff --git a/erts/emulator/test/nif_SUITE_data/nif_SUITE.c b/erts/emulator/test/nif_SUITE_data/nif_SUITE.c
index 5384a32f21..8489124966 100644
--- a/erts/emulator/test/nif_SUITE_data/nif_SUITE.c
+++ b/erts/emulator/test/nif_SUITE_data/nif_SUITE.c
@@ -1029,8 +1029,11 @@ static ERL_NIF_TERM make_term_list0(struct make_term_info* mti, int n)
static ERL_NIF_TERM make_term_resource(struct make_term_info* mti, int n)
{
void* resource = enif_alloc_resource(mti->resource_type, 10);
+ ERL_NIF_TERM term;
fill(resource, 10, n);
- return enif_make_resource(mti->dst_env, resource);
+ term = enif_make_resource(mti->dst_env, resource);
+ enif_release_resource(resource);
+ return term;
}
static ERL_NIF_TERM make_term_new_binary(struct make_term_info* mti, int n)
{