Question about initializing the run-time system

Hello, GHC's user guide says that the run-time system cannot re-initialize itself, after it was shut-down (i.e., you can't call `hs_init` after calling `hs_exit`). Could anyone shed some light on why that is? -Iavor

I looked at RtsStartup.c but I didn't see any code that was obviously enforcing this (have you tried it?)rts/RtsStartup.c However, at a guess, I bet the reason is related to the reason why we can't have multiple copies of the RTS in the same memory address space: the way we handle CAFs scribbles over data pages that we loaded in from objects. I last looked at this when working on https://ghc.haskell.org/trac/ghc/wiki/Commentary/Rts/Storage/HeapAlloced#Met... Edward Excerpts from Iavor Diatchki's message of 2016-08-15 11:02:54 -0700:
Hello,
GHC's user guide says that the run-time system cannot re-initialize itself, after it was shut-down (i.e., you can't call `hs_init` after calling `hs_exit`).
Could anyone shed some light on why that is?
-Iavor
participants (2)
-
Edward Z. Yang
-
Iavor Diatchki