Skip to content
  • Phuong Trinh's avatar
    Use binary search to speedup checkUnload · ce1e6538
    Phuong Trinh authored and Ben Gamari's avatar Ben Gamari committed
    We are iterating through all object code for each heap objects when
    checking whether object code can be unloaded. For large projects in
    GHCi, this can be very expensive due to the large number of object code
    that needs to be loaded/unloaded. To speed it up, this arrangess all
    mapped sections of unloaded object code in a sorted array and use binary
    search to check if an address location fall on them.
    
    (cherry picked from commit f81f3964)
    ce1e6538