[GHC] #8199: Get rid of HEAP_ALLOCED

GHC ghc-devs at haskell.org
Fri Feb 14 10:32:28 UTC 2014


#8199: Get rid of HEAP_ALLOCED
----------------------------+----------------------------------------------
        Reporter:  ezyang   |            Owner:  ezyang
            Type:  feature  |           Status:  new
  request                   |        Milestone:  7.10.1
        Priority:  normal   |          Version:  7.7
       Component:           |         Keywords:
  Compiler                  |     Architecture:  Unknown/Multiple
      Resolution:           |       Difficulty:  Project (more than a week)
Operating System:           |       Blocked By:  5435
  Unknown/Multiple          |  Related Tickets:
 Type of failure:           |
  None/Unknown              |
       Test Case:           |
        Blocking:           |
----------------------------+----------------------------------------------

Comment (by ezyang):

 I think in both cases, the usage-pattern of the symbols makes things "just
 work". Maybe this should be documented.

 In the case of foreign exports, you will usually end up linking the object
 file containing the init_array, because the exported symbols are in the
 same object file. This means we don't setup a stable pointer if the
 exported symbol is never referred to in the linking process, but that's
 desired behavior.

 In the case of profiling, functions which SCC emit code using
 'emitSetCCC'.  This will create a reference to a cost-centre object, which
 is contained in the object file that also has the init_array. If there are
 no SCCs in a module, the registration doesn't get run, but that's also
 desired behavior.

 So, it would seem that the appropriate thing to do here is ensure that
 there is an appropriate dependence between object files which have static
 closures and the initialization code. Frankly, I'm surprised that this
 isn't the case already; perhaps I need to link together some object files.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8199#comment:23>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list