functions: add next_pwr2() and calc_free_memory(percentage,cores)