Add a wrapper around libhwloc to discover memory and processing resources, and divide them among the configured cpu threads.