mpl icon indicating copy to clipboard operation
mpl copied to clipboard

Enable GC at the "top level"

Open shwestrick opened this issue 5 years ago • 1 comments

MPL currently avoids GC at the "top level" (i.e., outside any calls to par) because these collections typically interfere with parallelism. So far, for parallel programs, this hasn't been too much of a problem. But for sequential programs, this is obviously broken.

It's not hard to work around this issue by running the program inside an outermost par (see e.g. #112), but of course it would be nice if we didn't have to use such a workaround.

shwestrick avatar Feb 24 '20 03:02 shwestrick

Note also that currently the GC is disabled until the scheduler boots up (i.e. it is disabled until $(SML_LIB)/basis/fork-join.mlb is loaded). Ideally, this initial part of the program should still be GC'ed with a simple sequential algorithm.

shwestrick avatar Feb 24 '20 04:02 shwestrick