lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, 01 Jun 2010 08:54:05 +0300, Juris Kalnins <juris@mt.lv> wrote:

OK, done, maxalloc =    54509.978515625 , #t =  999999

Just noticed the 999999 -- no garbage gets freed, I've made a bug :(
I thought comparison also does the type conversion and was wrong.

after replacing one line with

    if n == NSIZE+0 then n = 0 else n = n + 1 end

and re-running the test cases:


$  ./lua ~/P/gengc-test.lua 500  100 10 0
short lastm 18111341 -> 0 totalb 18111152 (-258) debt +69 -> -1811110
full lastm 0 -> 18245091 totalb 18245091 (-1413855) debt +8 -> -1824500
short lastm 18245091 -> 0 totalb 18376163 (-1729852) debt +430096 -> -1837610 full lastm 0 -> 18376163 totalb 18376163 (-1729852) debt +154842 -> -1837610 short lastm 18376163 -> 0 totalb 18376265 (-1783460) debt +208552 -> -1837620 full lastm 0 -> 18376265 totalb 18376265 (-1795060) debt +220040 -> -1837620 short lastm 18376265 -> 0 totalb 18376265 (-1795060) debt +220040 -> -1837620 full lastm 0 -> 18376265 totalb 18376265 (-1795060) debt +220040 -> -1837620 short lastm 18376265 -> 0 totalb 18376265 (-1795060) debt +220040 -> -1837620 full lastm 0 -> 18376265 totalb 18376265 (-1795060) debt +220040 -> -1837620 short lastm 18376265 -> 0 totalb 18376265 (-1795060) debt +220040 -> -1837620 full lastm 0 -> 18376265 totalb 18376265 (-1795060) debt +220040 -> -1837620 short lastm 18376265 -> 0 totalb 18376265 (-1795060) debt +220040 -> -1837620 full lastm 0 -> 18376265 totalb 18376265 (-1795060) debt +220040 -> -1837620 short lastm 18376265 -> 0 totalb 18376265 (-1795060) debt +220040 -> -1837620 full lastm 0 -> 18376265 totalb 18376265 (-1795060) debt +220040 -> -1837620 short lastm 18376265 -> 0 totalb 18376265 (-1795060) debt +220040 -> -1837620 full lastm 0 -> 18376265 totalb 18376265 (-1795060) debt +220040 -> -1837620 short lastm 18376265 -> 0 totalb 18376265 (-1795060) debt +220040 -> -1837620 full lastm 0 -> 18376265 totalb 18376265 (-1795060) debt +220040 -> -1837620 short lastm 18376265 -> 0 totalb 18376265 (-1795060) debt +220040 -> -1837620 full lastm 0 -> 18376265 totalb 18376265 (-1795060) debt +220040 -> -1837620 short lastm 18376265 -> 0 totalb 18376265 (-1795060) debt +220040 -> -1837620 full lastm 0 -> 18376265 totalb 18376265 (-1795060) debt +220040 -> -1837620 short lastm 18376265 -> 0 totalb 18376265 (-1795060) debt +220040 -> -1837620 full lastm 0 -> 18376265 totalb 18376265 (-1795060) debt +220040 -> -1837620 short lastm 18376265 -> 0 totalb 18376265 (-1795060) debt +220040 -> -1837620 full lastm 0 -> 18376265 totalb 18376265 (-1795060) debt +220040 -> -1837620 short lastm 18376265 -> 0 totalb 18376265 (-1795060) debt +220040 -> -1837620 full lastm 0 -> 18376265 totalb 18376265 (-1795060) debt +220040 -> -1837620 short lastm 18376265 -> 0 totalb 18376265 (-1795060) debt +220040 -> -1837620
OK, done, maxalloc =    19442.513671875 , #t =  100



$  ./lua ~/P/gengc-test.lua 500  100 100 0
short lastm 18111322 -> 18111322 totalb 18111133 (-258) debt +69 -> -18111100
short lastm 18111322 -> 0 totalb 34399769 (+0) debt +2373020 -> -34399700
full lastm 0 -> 22308406 totalb 22308406 (-42296783) debt +24 -> -22308400
OK, done, maxalloc =    63090.958984375 , #t =  100


$ ./lua ~/P/gengc-test.lua 0 1 200 0

[...]
short lastm 32440 -> 32440 totalb 24248 (-72546) debt +10 -> -48400
short lastm 32440 -> 0 totalb 75738 (+0) debt +11738 -> -151400
full lastm 0 -> 32440 totalb 32440 (-178357) debt +43 -> -64800
short lastm 32440 -> 32440 totalb 24248 (-72546) debt +10 -> -48400
short lastm 32440 -> 0 totalb 75738 (+0) debt +11738 -> -151400
full lastm 0 -> 32440 totalb 32440 (-178357) debt +43 -> -64800
short lastm 32440 -> 32440 totalb 24248 (-72546) debt +10 -> -48400
short lastm 32440 -> 0 totalb 75738 (+0) debt +11738 -> -151400
full lastm 0 -> 32440 totalb 32440 (-178357) debt +43 -> -64800
short lastm 32440 -> 32440 totalb 24248 (-72546) debt +10 -> -48400
short lastm 32440 -> 0 totalb 75738 (+0) debt +11738 -> -151400
full lastm 0 -> 32440 totalb 32440 (-178357) debt +43 -> -64800
short lastm 32440 -> 32440 totalb 24248 (-72546) debt +10 -> -48400
short lastm 32440 -> 0 totalb 75738 (+0) debt +11738 -> -151400
OK, done, maxalloc =    205.810546875   , #t =  1


$ ./lua ~/P/gengc-test.lua 0 100 150 0

[...]
short lastm 36342 -> 36342 totalb 28150 (-62206) debt +20 -> -42150
short lastm 36342 -> 0 totalb 77337 (+0) debt +15685 -> -115950
full lastm 0 -> 36342 totalb 36342 (-140569) debt +8 -> -54450
short lastm 36342 -> 36342 totalb 28150 (-62206) debt +20 -> -42150
short lastm 36342 -> 0 totalb 77337 (+0) debt +15685 -> -115950
full lastm 0 -> 36342 totalb 36342 (-140569) debt +8 -> -54450
short lastm 36342 -> 36342 totalb 28150 (-62206) debt +20 -> -42150
short lastm 36342 -> 0 totalb 77337 (+0) debt +15685 -> -115950
full lastm 0 -> 36342 totalb 36342 (-140569) debt +8 -> -54450
short lastm 36342 -> 36342 totalb 28150 (-62206) debt +20 -> -42150
short lastm 36342 -> 0 totalb 77337 (+0) debt +15685 -> -115950
full lastm 0 -> 36342 totalb 36342 (-140569) debt +8 -> -54450
short lastm 36342 -> 36342 totalb 28150 (-62206) debt +20 -> -42150
short lastm 36342 -> 0 totalb 77337 (+0) debt +15685 -> -115950
OK, done, maxalloc =    172.71875       , #t =  100