4 ms·
To be fair to Norvig, malloc is also a relatively hefty abstraction comparable to a GC on a systems level.
by slaymaker1907 8y ago
To be fair to Norvig, malloc is also a relatively hefty abstraction comparable to a GC on a systems level.
- krig 8y agoThat is certainly a good point. The problem I felt with dropping below malloc is that the code becomes very platform-dependent.
- blt 8y agobut 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.