MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / tuneAutoGarbageCollection

Method tuneAutoGarbageCollection

source/core/StarLua.cpp:575–578  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

573}
574
575void LuaEngine::tuneAutoGarbageCollection(float pause, float stepMultiplier) {
576 lua_gc(m_state, LUA_GCSETPAUSE, round(pause * 100));
577 lua_gc(m_state, LUA_GCSETSTEPMUL, round(stepMultiplier * 100));
578}
579
580size_t LuaEngine::memoryUsage() const {
581 return (size_t)lua_gc(m_state, LUA_GCCOUNT, 0) * 1024 + lua_gc(m_state, LUA_GCCOUNTB, 0);

Callers

nothing calls this directly

Calls 2

lua_gcFunction · 0.85
roundFunction · 0.85

Tested by

no test coverage detected