aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_nif.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2010-07-20 18:49:48 +0200
committerSverker Eriksson <[email protected]>2010-07-20 18:49:48 +0200
commit9267b2dc792c0a7632a0dcdc0a49510eb13e465e (patch)
treee18a6e9d1fd56526893a208d64ead6e285cc6a18 /erts/emulator/beam/erl_nif.c
parent9f44863204c56dcfa38c67db9662f7f1b7e6c582 (diff)
parentdb206769c477aae8bafb7ae9b6b4fe1ad56cf729 (diff)
downloadotp-9267b2dc792c0a7632a0dcdc0a49510eb13e465e.tar.gz
otp-9267b2dc792c0a7632a0dcdc0a49510eb13e465e.tar.bz2
otp-9267b2dc792c0a7632a0dcdc0a49510eb13e465e.zip
Merge branch 'sverker/one_offheap_list/OTP-8737' into dev
* sverker/one_offheap_list/OTP-8737: One off-heap list, to eliminate two words per ETS object.
Diffstat (limited to 'erts/emulator/beam/erl_nif.c')
-rw-r--r--erts/emulator/beam/erl_nif.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c
index 3d63fa1caf..e95d9c4f75 100644
--- a/erts/emulator/beam/erl_nif.c
+++ b/erts/emulator/beam/erl_nif.c
@@ -258,9 +258,7 @@ void enif_free_env(ErlNifEnv* env)
static ERTS_INLINE void clear_offheap(ErlOffHeap* oh)
{
- oh->mso = NULL;
- oh->externals = NULL;
- oh->funs = NULL;
+ oh->first = NULL;
oh->overhead = 0;
}
@@ -364,7 +362,7 @@ ERL_NIF_TERM enif_make_copy(ErlNifEnv* dst_env, ERL_NIF_TERM src_term)
#ifdef DEBUG
static int is_offheap(const ErlOffHeap* oh)
{
- return oh->mso != NULL || oh->funs != NULL || oh->externals != NULL;
+ return oh->first != NULL;
}
#endif
@@ -627,8 +625,8 @@ Eterm enif_make_binary(ErlNifEnv* env, ErlNifBinary* bin)
pb = (ProcBin *) alloc_heap(env, PROC_BIN_SIZE);
pb->thing_word = HEADER_PROC_BIN;
pb->size = bptr->orig_size;
- pb->next = MSO(env->proc).mso;
- MSO(env->proc).mso = pb;
+ pb->next = MSO(env->proc).first;
+ MSO(env->proc).first = (struct erl_off_heap_header*) pb;
pb->val = bptr;
pb->bytes = (byte*) bptr->orig_bytes;
pb->flags = 0;