Use binary search to speedup checkUnload

Authored by Phuong Trinh <lolotp@fb.com> on Apr 1 2019, 2:05 PM.

Description

Use binary search to speedup checkUnload

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.

Details

Committed
Marge Bot <ben+marge-bot@smart-cactus.org>May 30 2019, 3:43 PM
Parents
rGHC4ad37a323b9c: rts: Handle zero-sized mappings in MachO linker
Branches
Unknown
Tags
Unknown
Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHCf81f3964b718: Use binary search to speedup checkUnload (authored by Phuong Trinh <lolotp@fb.com>).May 30 2019, 3:43 PM