Small modif in PhysicalMemory functions.Saw there exist functions in frame to read and write so using them instead of reimplementing it myself