In the original code, 'PlasmaAllocator::SetFootprintLimit' happens before dealing with huge pages, which could change the memory limit. Also I found other dirty code needed to be written in a better way.
Reporter: Siyuan Zhuang / @suquark
PRs and other links:
Note: This issue was originally created as ARROW-8081. Please see the migration documentation for further details.