1

R16B02 erl_db.c:1272

/* we create table outside any table lock
 * and take the unusal cost of destroy table if it
 * fails to find a slot 
 */
{
    DbTable init_tb;

    erts_smp_atomic_init_nob(&init_tb.common.memory_size, 0);
    tb = (DbTable*) erts_db_alloc(ERTS_ALC_T_DB_TABLE,
                                  &init_tb, sizeof(DbTable));
    erts_smp_atomic_init_nob(&tb->common.memory_size,
                             erts_smp_atomic_read_nob(&init_tb.common.memory_size));
}

私のクズ。なぜこれを行うのですか?init_tb は common.memory_size フィールドを使用するだけです。int 置換を使用しないのはなぜですか?

4

1 に答える 1