Why don't Haskell compilers facilitate deterministic memory management?

前端 未结 5 1592
栀梦
栀梦 2021-02-02 11:48

With the wealth of type information available why can\'t Haskell runtimes avoid running GC to clean up? It should be possible to figure out all usages and insert appropriate cal

5条回答
  •  一生所求
    2021-02-02 12:24

    It's not easy to determine object lifetime with lazy evaluation. The JHC compiler does have (had?) region memory management which tries to release memory by deallocation when the lifetime is over.

    I'm also curious exactly what you mean by deterministic memory management.

提交回复
热议问题