diff options
author | Sverker Eriksson <[email protected]> | 2015-03-20 16:37:18 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2015-03-20 17:32:13 +0100 |
commit | c1be2e5baed4794f7017dab9558afe8a737b63ee (patch) | |
tree | 227bb8a0148cc6d7a54bd6af750c8de6d72e838e /erts/emulator/beam/erl_bif_info.c | |
parent | 6071cbf00680b94d107906e1c7f1e13f79676479 (diff) | |
download | otp-c1be2e5baed4794f7017dab9558afe8a737b63ee.tar.gz otp-c1be2e5baed4794f7017dab9558afe8a737b63ee.tar.bz2 otp-c1be2e5baed4794f7017dab9558afe8a737b63ee.zip |
erts: Add test map_SUITE:t_hashmap_balance
Diffstat (limited to 'erts/emulator/beam/erl_bif_info.c')
-rw-r--r-- | erts/emulator/beam/erl_bif_info.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c index d750e34be3..0774ab51af 100644 --- a/erts/emulator/beam/erl_bif_info.c +++ b/erts/emulator/beam/erl_bif_info.c @@ -3597,6 +3597,26 @@ BIF_RETTYPE erts_debug_get_internal_state_1(BIF_ALIST_1) BIF_RET(erts_debug_reader_groups_map(BIF_P, (int) groups)); } + else if (ERTS_IS_ATOM_STR("internal_hash", tp[1])) { + Uint hash = (Uint) make_internal_hash(tp[2]); + Uint hsz = 0; + Eterm* hp; + erts_bld_uint(NULL, &hsz, hash); + hp = HAlloc(BIF_P,hsz); + return erts_bld_uint(&hp, NULL, hash); + } + else if (ERTS_IS_ATOM_STR("atom", tp[1])) { + Uint ix; + if (!term_to_Uint(tp[2], &ix)) + BIF_ERROR(BIF_P, BADARG); + while (ix >= atom_table_size()) { + char tmp[20]; + erts_snprintf(tmp, sizeof(tmp), "am%x", atom_table_size()); + erts_atom_put((byte *) tmp, strlen(tmp), ERTS_ATOM_ENC_LATIN1, 1); + } + return make_atom(ix); + } + break; } default: |