Use physmem and realmem from get_memory() in the appropriate places