Add a common get_ram_size() function and modify the the