A comment from during review of PR 626:
Can the three methods get_mem_on_node, get_vmem_on_node and get_hpmem_on_node be combined into one? They have a lot of common code.