Remix.run Logo
▲ debugnik an hour ago

I was assuming they meant for the heap. Not even executable memory is locked though, so if you mlock too much memory the kernel will page out your executable instead. Something has to give, so it's better to schedule it.

On a lower level, the OCaml and cpython GCs use a prefetch buffer during marking to schedule around the cache.