diff options
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -537,7 +537,7 @@ static void checkobject (global_State *g, GCObject *o, int maybedead, | |||
537 | } | 537 | } |
538 | 538 | ||
539 | 539 | ||
540 | static l_obj checkgraylist (global_State *g, GCObject *o) { | 540 | static l_mem checkgraylist (global_State *g, GCObject *o) { |
541 | int total = 0; /* count number of elements in the list */ | 541 | int total = 0; /* count number of elements in the list */ |
542 | cast_void(g); /* better to keep it if we need to print an object */ | 542 | cast_void(g); /* better to keep it if we need to print an object */ |
543 | while (o) { | 543 | while (o) { |
@@ -566,8 +566,8 @@ static l_obj checkgraylist (global_State *g, GCObject *o) { | |||
566 | /* | 566 | /* |
567 | ** Check objects in gray lists. | 567 | ** Check objects in gray lists. |
568 | */ | 568 | */ |
569 | static l_obj checkgrays (global_State *g) { | 569 | static l_mem checkgrays (global_State *g) { |
570 | l_obj total = 0; /* count number of elements in all lists */ | 570 | l_mem total = 0; /* count number of elements in all lists */ |
571 | if (!keepinvariant(g)) return total; | 571 | if (!keepinvariant(g)) return total; |
572 | total += checkgraylist(g, g->gray); | 572 | total += checkgraylist(g, g->gray); |
573 | total += checkgraylist(g, g->grayagain); | 573 | total += checkgraylist(g, g->grayagain); |
@@ -583,7 +583,7 @@ static l_obj checkgrays (global_State *g) { | |||
583 | ** 'count' and check its TESTBIT. (It must have been previously set by | 583 | ** 'count' and check its TESTBIT. (It must have been previously set by |
584 | ** 'checkgraylist'.) | 584 | ** 'checkgraylist'.) |
585 | */ | 585 | */ |
586 | static void incifingray (global_State *g, GCObject *o, l_obj *count) { | 586 | static void incifingray (global_State *g, GCObject *o, l_mem *count) { |
587 | if (!keepinvariant(g)) | 587 | if (!keepinvariant(g)) |
588 | return; /* gray lists not being kept in these phases */ | 588 | return; /* gray lists not being kept in these phases */ |
589 | if (o->tt == LUA_VUPVAL) { | 589 | if (o->tt == LUA_VUPVAL) { |
@@ -600,10 +600,10 @@ static void incifingray (global_State *g, GCObject *o, l_obj *count) { | |||
600 | } | 600 | } |
601 | 601 | ||
602 | 602 | ||
603 | static l_obj checklist (global_State *g, int maybedead, int tof, | 603 | static l_mem checklist (global_State *g, int maybedead, int tof, |
604 | GCObject *newl, GCObject *survival, GCObject *old, GCObject *reallyold) { | 604 | GCObject *newl, GCObject *survival, GCObject *old, GCObject *reallyold) { |
605 | GCObject *o; | 605 | GCObject *o; |
606 | l_obj total = 0; /* number of object that should be in gray lists */ | 606 | l_mem total = 0; /* number of object that should be in gray lists */ |
607 | for (o = newl; o != survival; o = o->next) { | 607 | for (o = newl; o != survival; o = o->next) { |
608 | checkobject(g, o, maybedead, G_NEW); | 608 | checkobject(g, o, maybedead, G_NEW); |
609 | incifingray(g, o, &total); | 609 | incifingray(g, o, &total); |
@@ -632,8 +632,8 @@ int lua_checkmemory (lua_State *L) { | |||
632 | global_State *g = G(L); | 632 | global_State *g = G(L); |
633 | GCObject *o; | 633 | GCObject *o; |
634 | int maybedead; | 634 | int maybedead; |
635 | l_obj totalin; /* total of objects that are in gray lists */ | 635 | l_mem totalin; /* total of objects that are in gray lists */ |
636 | l_obj totalshould; /* total of objects that should be in gray lists */ | 636 | l_mem totalshould; /* total of objects that should be in gray lists */ |
637 | if (keepinvariant(g)) { | 637 | if (keepinvariant(g)) { |
638 | assert(!iswhite(g->mainthread)); | 638 | assert(!iswhite(g->mainthread)); |
639 | assert(!iswhite(gcvalue(&g->l_registry))); | 639 | assert(!iswhite(gcvalue(&g->l_registry))); |
@@ -1040,7 +1040,7 @@ static int table_query (lua_State *L) { | |||
1040 | 1040 | ||
1041 | static int query_GCparams (lua_State *L) { | 1041 | static int query_GCparams (lua_State *L) { |
1042 | global_State *g = G(L); | 1042 | global_State *g = G(L); |
1043 | lua_pushinteger(L, cast(lua_Integer, gettotalobjs(g))); | 1043 | lua_pushinteger(L, cast(lua_Integer, gettotalbytes(g))); |
1044 | lua_pushinteger(L, cast(lua_Integer, g->GCdebt)); | 1044 | lua_pushinteger(L, cast(lua_Integer, g->GCdebt)); |
1045 | lua_pushinteger(L, cast(lua_Integer, applygcparam(g, MINORMUL, 100))); | 1045 | lua_pushinteger(L, cast(lua_Integer, applygcparam(g, MINORMUL, 100))); |
1046 | lua_pushinteger(L, cast(lua_Integer, applygcparam(g, MAJORMINOR, 100))); | 1046 | lua_pushinteger(L, cast(lua_Integer, applygcparam(g, MAJORMINOR, 100))); |