replace os.name with sys.platform
Merge remote-tracking branch 'origin/free_memory' into free_memory