Open ammarbinfaisal opened 1 year ago
a stop the world mark and sweep has been implemented in f7d1afc1bf4d102221bc34d79ebdec77329e2e8c but it causes a double free while running sort.sahl
it causes a double free while running sort.sahl
this was fixed. Now the issue is that it isn't concurrent and doesn't gc from coroutines.
implement cheney 4c334733aa0706a5f0327307e064e511d3c139aa
for the program
fun alloc(i: int) {
print(i, "\n")
let a = make([int], 100000000)
print(len(a), "\n")
}
fun main() {
let end = 1024*1024
for i in 0..end {
alloc(i)
}
}
old gc: ./sahl ./exe.bin 1.35s user 11.28s system 96% cpu 13.093 total
new gc: ./sahl ./exe.bin 0.86s user 6.08s system 90% cpu 7.696 total
need one for rt.c/runtime.rs
https://www.mono-project.com/docs/advanced/garbage-collector/sgen/