LuaJIT-5.3.6 icon indicating copy to clipboard operation
LuaJIT-5.3.6 copied to clipboard

这里为啥是res + res/1024?

Open hooting opened this issue 3 years ago • 1 comments
trafficstars

https://github.com/Yu2erer/LuaJIT-5.3.6/blob/369119a005b925213050950d72694226b7512cac/src/YGC.c#L276

https://github.com/Yu2erer/LuaJIT-5.3.6/blob/369119a005b925213050950d72694226b7512cac/src/YGC.c#L249 已经做了单位B到KB的转换,我理解的是:直接返回 lua_pushnumber(L, (lua_Number)res);

hooting avatar Jun 06 '22 08:06 hooting

笔误,本意是想算的更精确一些,结果这边直接/1024了,应该是 Kbytes + bytes / 1024

Yu2erer avatar Jun 06 '22 08:06 Yu2erer