aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_node_tables.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2012-08-02 18:21:50 +0200
committerRickard Green <[email protected]>2012-12-03 21:18:04 +0100
commit6da93c20472f5d13b34a40ca53cba4fe6f352d24 (patch)
tree5b1aa9146d389eaed4960172466a09cd9a671dc1 /erts/emulator/beam/erl_node_tables.c
parentd827ac847517ed43339a6a86493c7c017be782a5 (diff)
downloadotp-6da93c20472f5d13b34a40ca53cba4fe6f352d24.tar.gz
otp-6da93c20472f5d13b34a40ca53cba4fe6f352d24.tar.bz2
otp-6da93c20472f5d13b34a40ca53cba4fe6f352d24.zip
Generalize process table implementation
Diffstat (limited to 'erts/emulator/beam/erl_node_tables.c')
-rw-r--r--erts/emulator/beam/erl_node_tables.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_node_tables.c b/erts/emulator/beam/erl_node_tables.c
index 9bf8bf6580..93122b8317 100644
--- a/erts/emulator/beam/erl_node_tables.c
+++ b/erts/emulator/beam/erl_node_tables.c
@@ -1274,7 +1274,7 @@ setup_reference_table(void)
ErlHeapFragment *hfp;
DistEntry *dep;
HashInfo hi;
- int i;
+ int i, max_processes;
DeclareTmpHeapNoproc(heap,3);
inserted_bins = NULL;
@@ -1309,8 +1309,9 @@ setup_reference_table(void)
#endif
UnUseTmpHeapNoproc(3);
+ max_processes = erts_ptab_max(&erts_proc);
/* Insert all processes */
- for (i = 0; i < erts_max_processes; i++) {
+ for (i = 0; i < max_processes; i++) {
Process *proc = erts_pix2proc(i);
if (proc) {
ErlMessage *msg;
@@ -1344,7 +1345,7 @@ setup_reference_table(void)
proc->id);
}
#ifdef ERTS_SMP
- for (msg = proc->u.alive.msg_inq.first; msg; msg = msg->next) {
+ for (msg = proc->msg_inq.first; msg; msg = msg->next) {
ErlHeapFragment *heap_frag = NULL;
if (msg->data.attached) {
if (is_value(ERL_MESSAGE_TERM(msg)))