diff options
author | Lukas Larsson <[email protected]> | 2013-09-30 14:16:05 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2013-09-30 14:16:05 +0200 |
commit | c5459f9ba0e8b3568a34788bfd596f5f6be9fca2 (patch) | |
tree | 89afe690217fb991bd26b4ae6fba5939d46adf86 /erts/emulator/beam | |
parent | 0f430abcb189988a7faf55386557b2b74afa6f56 (diff) | |
parent | 0d18c06a55bcde2af8cff12fe49093fffd32466c (diff) | |
download | otp-c5459f9ba0e8b3568a34788bfd596f5f6be9fca2.tar.gz otp-c5459f9ba0e8b3568a34788bfd596f5f6be9fca2.tar.bz2 otp-c5459f9ba0e8b3568a34788bfd596f5f6be9fca2.zip |
Merge branch 'sv/system_info_max_ets' into maint
OTP-11362
* sv/system_info_max_ets:
Update preloaded
add system_info(ets_limit)
Diffstat (limited to 'erts/emulator/beam')
-rwxr-xr-x | erts/emulator/beam/erl_bif_info.c | 3 | ||||
-rw-r--r-- | erts/emulator/beam/erl_db.c | 7 | ||||
-rw-r--r-- | erts/emulator/beam/erl_db.h | 2 |
3 files changed, 12 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c index 673dfc658c..3b25efd9af 100755 --- a/erts/emulator/beam/erl_bif_info.c +++ b/erts/emulator/beam/erl_bif_info.c @@ -2636,6 +2636,9 @@ BIF_RETTYPE system_info_1(BIF_ALIST_1) BIF_RET(res); } + else if (ERTS_IS_ATOM_STR("ets_limit",BIF_ARG_1)) { + BIF_RET(make_small(erts_db_get_max_tabs())); + } BIF_ERROR(BIF_P, BADARG); } diff --git a/erts/emulator/beam/erl_db.c b/erts/emulator/beam/erl_db.c index 98c2988323..40b8eaf8fb 100644 --- a/erts/emulator/beam/erl_db.c +++ b/erts/emulator/beam/erl_db.c @@ -3811,6 +3811,13 @@ erts_db_foreach_offheap(DbTable *tb, tb->common.meth->db_foreach_offheap(tb, func, arg); } +/* retrieve max number of ets tables */ +Uint +erts_db_get_max_tabs() +{ + return db_max_tabs; +} + /* * For testing of meta tables only. * diff --git a/erts/emulator/beam/erl_db.h b/erts/emulator/beam/erl_db.h index 6b62e10eb7..5b4681fc90 100644 --- a/erts/emulator/beam/erl_db.h +++ b/erts/emulator/beam/erl_db.h @@ -79,6 +79,8 @@ extern erts_smp_atomic_t erts_ets_misc_mem_size; Eterm erts_ets_colliding_names(Process*, Eterm name, Uint cnt); +Uint erts_db_get_max_tabs(void); + #endif #if defined(ERTS_WANT_DB_INTERNAL__) && !defined(ERTS_HAVE_DB_INTERNAL__) |