MCPcopy Create free account
hub / github.com/DFHack/dfhack / sweepstep

Function sweepstep

depends/lua/src/lgc.c:1029–1042  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1027
1028
1029static lu_mem sweepstep (lua_State *L, global_State *g,
1030 int nextstate, GCObject **nextlist) {
1031 if (g->sweepgc) {
1032 l_mem olddebt = g->GCdebt;
1033 g->sweepgc = sweeplist(L, g->sweepgc, GCSWEEPMAX);
1034 g->GCestimate += g->GCdebt - olddebt; /* update estimate */
1035 if (g->sweepgc) /* is there still something to sweep? */
1036 return (GCSWEEPMAX * GCSWEEPCOST);
1037 }
1038 /* else enter next state */
1039 g->gcstate = nextstate;
1040 g->sweepgc = nextlist;
1041 return 0;
1042}
1043
1044
1045static lu_mem singlestep (lua_State *L) {

Callers 1

singlestepFunction · 0.85

Calls 1

sweeplistFunction · 0.85

Tested by

no test coverage detected