diff options
author | Patrik Nyblom <[email protected]> | 2013-04-05 18:52:53 +0200 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2013-04-05 18:52:53 +0200 |
commit | fea6a84a9a08902fea79085e135f6e53986c02a2 (patch) | |
tree | 5b7064170f8c2c5b2e070603f05d1f632f719367 /erts/emulator/beam/io.c | |
parent | f8610708a847dcc6352df1d65c391b697897e712 (diff) | |
parent | b9ef8bac23fa0421765afe3073f430a1f0d92260 (diff) | |
download | otp-fea6a84a9a08902fea79085e135f6e53986c02a2.tar.gz otp-fea6a84a9a08902fea79085e135f6e53986c02a2.tar.bz2 otp-fea6a84a9a08902fea79085e135f6e53986c02a2.zip |
Merge branch 'maint'
Diffstat (limited to 'erts/emulator/beam/io.c')
-rw-r--r-- | erts/emulator/beam/io.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c index a9771de7ad..7cadd4aaad 100644 --- a/erts/emulator/beam/io.c +++ b/erts/emulator/beam/io.c @@ -2651,11 +2651,17 @@ void erts_init_io(int port_tab_size, int port_tab_size_ignore_files) { ErlDrvEntry** dp; + UWord common_element_size; erts_smp_rwmtx_opt_t drv_list_rwmtx_opts = ERTS_SMP_RWMTX_OPT_DEFAULT_INITER; drv_list_rwmtx_opts.type = ERTS_SMP_RWMTX_TYPE_EXTREMELY_FREQUENT_READ; drv_list_rwmtx_opts.lived = ERTS_SMP_RWMTX_LONG_LIVED; + common_element_size = ERTS_ALC_DATA_ALIGN_SIZE(sizeof(Port)); + common_element_size += ERTS_ALC_DATA_ALIGN_SIZE(sizeof(ErtsPortTaskBusyPortQ)); + common_element_size += 10; /* name */ #ifdef ERTS_SMP + common_element_size += sizeof(erts_mtx_t); + init_xports_list_alloc(); #endif @@ -2684,6 +2690,7 @@ void erts_init_io(int port_tab_size, NULL, (ErtsPTabElementCommon *) &erts_invalid_port.common, port_tab_size, + common_element_size, /* Doesn't need to be excact */ "port_table"); erts_smp_atomic_init_nob(&erts_bytes_out, 0); |