diff options
author | Sverker Eriksson <[email protected]> | 2010-06-23 16:57:44 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2010-07-20 18:47:08 +0200 |
commit | db206769c477aae8bafb7ae9b6b4fe1ad56cf729 (patch) | |
tree | f2ab6834959c634fa41ee506e4e139a8be685d93 /erts/emulator/beam/erl_message.h | |
parent | c4b4edaaf03ac12e12080cb4a3768edbb6ecf77d (diff) | |
download | otp-db206769c477aae8bafb7ae9b6b4fe1ad56cf729.tar.gz otp-db206769c477aae8bafb7ae9b6b4fe1ad56cf729.tar.bz2 otp-db206769c477aae8bafb7ae9b6b4fe1ad56cf729.zip |
One off-heap list, to eliminate two words per ETS object.
Merging the three off-heap lists (binaries, funs and externals) into
one list. This reduces memory consumption by two words (pointers) per
ETS object.
Diffstat (limited to 'erts/emulator/beam/erl_message.h')
-rw-r--r-- | erts/emulator/beam/erl_message.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/erts/emulator/beam/erl_message.h b/erts/emulator/beam/erl_message.h index f478572ac2..890af2675c 100644 --- a/erts/emulator/beam/erl_message.h +++ b/erts/emulator/beam/erl_message.h @@ -28,13 +28,18 @@ struct external_thing_; * but is stored outside of any heap. */ +struct erl_off_heap_header { + Eterm thing_word; + union { + Uint size; + void* ptr; + }u; + struct erl_off_heap_header* next; +}; + typedef struct erl_off_heap { - struct proc_bin* mso; /* List of associated binaries. */ -#ifndef HYBRID /* FIND ME! */ - struct erl_fun_thing* funs; /* List of funs. */ -#endif - struct external_thing_* externals; /* List of external things. */ - int overhead; /* Administrative overhead (used to force GC). */ + struct erl_off_heap_header* first; + int overhead; /* Administrative overhead (used to force GC). */ } ErlOffHeap; #include "external.h" @@ -201,9 +206,7 @@ do { \ (HEAP_FRAG_P)->next = NULL; \ (HEAP_FRAG_P)->alloc_size = (DATA_WORDS); \ (HEAP_FRAG_P)->used_size = (DATA_WORDS); \ - (HEAP_FRAG_P)->off_heap.mso = NULL; \ - (HEAP_FRAG_P)->off_heap.funs = NULL; \ - (HEAP_FRAG_P)->off_heap.externals = NULL; \ + (HEAP_FRAG_P)->off_heap.first = NULL; \ (HEAP_FRAG_P)->off_heap.overhead = 0; \ } while (0) |