MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / checkminormajor

Function checkminormajor

third-party/lua-5.5.0/src/lgc.c:1323–1328  ·  view source on GitHub ↗

** Decide whether to shift to major mode. It shifts if the accumulated ** number of added old bytes (counted in 'GCmarked') is larger than ** 'minormajor'% of the number of lived bytes after the last major ** collection. (This number is kept in 'GCmajorminor'.) */

Source from the content-addressed store, hash-verified

1321** collection. (This number is kept in 'GCmajorminor'.)
1322*/
1323static int checkminormajor (global_State *g) {
1324 l_mem limit = applygcparam(g, MINORMAJOR, g->GCmajorminor);
1325 if (limit == 0)
1326 return 0; /* special case: 'minormajor' 0 stops major collections */
1327 return (g->GCmarked >= limit);
1328}
1329
1330/*
1331** Does a young collection. First, mark 'OLD1' objects. Then does the

Callers 1

youngcollectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected