Skip to content
  • Ben Gamari's avatar
    051d8a37
    rts: Allow ExecPage to allocate anywhere in address space · 051d8a37
    Ben Gamari authored and Zubin's avatar Zubin committed
    Currently the ExecPage facility has two users:
    
     * GHCi, for constructing info tables, and
     * the adjustor allocation path
    
    Despite neither of these have any spatial locality constraints ExecPage
    was using the linker's `mmapAnonForLinker`, which tries hard to ensure
    that mappings end up nearby the executable image. This makes adjustor
    allocation needlessly subject to fragmentation concerns.
    
    We now instead return less constrained mappings, improving the
    robustness of the mechanism.
    
    Addresses #25503.
    
    (cherry picked from commit a104508d)
    051d8a37
    rts: Allow ExecPage to allocate anywhere in address space
    Ben Gamari authored and Zubin's avatar Zubin committed
    Currently the ExecPage facility has two users:
    
     * GHCi, for constructing info tables, and
     * the adjustor allocation path
    
    Despite neither of these have any spatial locality constraints ExecPage
    was using the linker's `mmapAnonForLinker`, which tries hard to ensure
    that mappings end up nearby the executable image. This makes adjustor
    allocation needlessly subject to fragmentation concerns.
    
    We now instead return less constrained mappings, improving the
    robustness of the mechanism.
    
    Addresses #25503.
    
    (cherry picked from commit a104508d)
Loading