Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
14ddcb7b
Commit
14ddcb7b
authored
12 years ago
by
Konstantin Osipov
Browse files
Options
Downloads
Plain Diff
Merge branch 'box.slab'
parents
57cc9bcc
a98ac1c6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/tarantool_lua_slab.m
+11
-10
11 additions, 10 deletions
src/tarantool_lua_slab.m
with
11 additions
and
10 deletions
src/tarantool_lua_slab.m
+
11
−
10
View file @
14ddcb7b
...
...
@@ -27,6 +27,7 @@
* SUCH DAMAGE.
*/
#include "tarantool_lua_slab.h"
#include "tarantool_lua.h"
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
...
...
@@ -42,27 +43,27 @@ salloc_stat_lua_cb(const struct slab_class_stats *cstat, void *cb_ctx)
* Create a Lua table for every slab class. A class is
* defined by its item size.
*/
lua_pushnumber(L, cstat->item_size);
lua
L
_pushnumber
64
(L, cstat->item_size);
lua_newtable(L);
lua_pushstring(L, "slabs");
lua_pushnumber(L, cstat->slabs);
lua
L
_pushnumber
64
(L, cstat->slabs);
lua_settable(L, -3);
lua_pushstring(L, "items");
lua_pushnumber(L, cstat->items);
lua
L
_pushnumber
64
(L, cstat->items);
lua_settable(L, -3);
lua_pushstring(L, "bytes_used");
lua_pushnumber(L, cstat->bytes_used);
lua
L
_pushnumber
64
(L, cstat->bytes_used);
lua_settable(L, -3);
lua_pushstring(L, "bytes_free");
lua_pushnumber(L, cstat->bytes_free);
lua
L
_pushnumber
64
(L, cstat->bytes_free);
lua_settable(L, -3);
lua_pushstring(L, "item_size");
lua_pushnumber(L, cstat->item_size);
lua
L
_pushnumber
64
(L, cstat->item_size);
lua_settable(L, -3);
lua_settable(L, -3);
...
...
@@ -83,7 +84,7 @@ lbox_slab_arena_used(struct lua_State *L)
{
struct slab_arena_stats astat;
salloc_stat(NULL,
&
astat, NULL);
lua_pushnumber(L, astat.used);
lua
L
_pushnumber
64
(L, astat.used);
return 1;
}
...
...
@@ -92,7 +93,7 @@ lbox_slab_arena_size(struct lua_State *L)
{
struct slab_arena_stats astat;
salloc_stat(NULL,
&
astat, NULL);
lua_pushnumber(L, astat.size);
lua
L
_pushnumber
64
(L, astat.size);
return 1;
}
...
...
@@ -108,11 +109,11 @@ lbox_slab_call(struct lua_State *L)
lua_settable(L, -3);
lua_pushstring(L, "arena_used");
lua_pushnumber(L, astat.used);
lua
L
_pushnumber
64
(L, astat.used);
lua_settable(L, -3);
lua_pushstring(L, "arena_size");
lua_pushnumber(L, astat.size);
lua
L
_pushnumber
64
(L, astat.size);
lua_settable(L, -3);
return 1;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment