ammarbinfaisal / sahl

a programming language with channels and coroutines/threads
MIT License
9 stars 1 forks source link

treadmill gc #33

Open ammarbinfaisal opened 1 year ago

ammarbinfaisal commented 1 year ago

https://www.mono-project.com/docs/advanced/garbage-collector/sgen/

ammarbinfaisal commented 1 year ago

https://www.ardanlabs.com/blog/2018/12/garbage-collection-in-go-part1-semantics.html

ammarbinfaisal commented 1 year ago

https://ocamlpro.com/blog/2020_03_23_in_depth_look_at_best_fit_gc/

ammarbinfaisal commented 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

ammarbinfaisal commented 1 year ago

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.

ammarbinfaisal commented 9 months ago

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

ammarbinfaisal commented 9 months ago

need one for rt.c/runtime.rs

ammarbinfaisal commented 8 months ago

https://web.archive.org/web/20220726022112/https://www.cofault.com/2022/07/treadmill.html

ammarbinfaisal commented 7 months ago

https://www2.cs.arizona.edu/~collberg/Teaching/553/2011/Handouts/Handout-12.pdf