adjust total memory to be a power of 2