Add hmap/chunk memory repartition and prev_prime calculator