Question about initializing the run-time system

Edward Z. Yang ezyang at mit.edu
Wed Aug 17 03:26:46 UTC 2016


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#Method2:copystaticclosuresintoaspecialareaatstartup

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


More information about the ghc-devs mailing list