News for hackers. Stuff that matters.
Re:Show HN: Lisp with copying GC in 537 lines of C (plus Lis... by slaymaker1907 on Monday October 15, 2018 @04:56AM (#18218314)
To be fair to Norvig, malloc is also a relatively hefty abstraction comparable to a GC on a systems level.
Re:Show HN: Lisp with copying GC in 537 lines of C (plus Lis... by krig on Monday October 15, 2018 @06:07AM (#18218560)
That is certainly a good point. The problem I felt with dropping below malloc is that the code becomes very platform-dependent.
Re:Show HN: Lisp with copying GC in 537 lines of C (plus Lis... by blt on Monday October 15, 2018 @02:46PM (#18222495)
but copying GC can be easily implemented with sbrk, or on the bare metal if no MMU is present. mpirstitz's GC uses mmap but could easily be replaced with sbrk. the main challenge of dynamic memory management is fragmentation, which is completely handled by using a copying GC. an implementation on top of malloc is not leaning on malloc's fragmentation handling at all.