-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feedback: box.runtime.info() | Tarantool #2911
Comments
The code is the following. src/box/lua/slab.cc#L240-L242: static int
lbox_runtime_info(struct lua_State *L)
{
<...>
lua_pushstring(L, "used");
luaL_pushuint64(L, runtime.used);
lua_settable(L, -3);
<...>
} src/lib/core/memory.h#L45-L46: /* Global runtime memory. */
extern struct slab_arena runtime; src/lib/small/include/small/slab_arena.h#L94-L98: struct slab_arena {
<...>
/**
* How much memory in the arena has
* already been initialized for slabs.
*/
size_t used;
<...>
}; Related discussion: tarantool/tarantool#7106. |
Related issue: #2829. It will be done by @ Totktonada after I do this one. |
Need to verify with @ alyapunov what the return values mean. |
@ igormunkin:
|
@ alyapunov: что касается арен.. та, что memtx - используется для таплов в базе данных и индексов. все три наших арены (memtx, vinyl, runtime) - независимы. и luaшная "арена" - тоже есть внутренние механизмы lua, которые аллоцирую память сами, не спрашивая тарантул "как и где". это и есть lua arena. А если пользователь пишет a = 'aaa' b = 'bbb' c = a .. b, то эти все строки луа создаст у себя в арене, не спрашивая тарантул. потому что это обычные строки, они не имеют отношения к тарантулу |
@ alyapunov: |
@ Totktonada: |
Resolves #2911 * Clarify box.runtime.info() description * Rephrase the garbage collector part * Clarify the difference between runtime memory and runtime arena
https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_slab/runtime_info/
As I (@Totktonada) see from the code, it has no relation to Lua memory.
@patiencedaur: clarify the difference between "Lua memory" and "memory occupied by certain Tarantool Lua objects"
The text was updated successfully, but these errors were encountered: