made shutil's mem() act more like free

This commit is contained in:
Izaya 2017-08-03 17:53:36 +10:00
parent 0db4fdee01
commit b47fb83d73

View File

@ -18,7 +18,9 @@ function ps(f)
end end
end end
function mem() function mem()
print("Total:\t"..tostring(math.floor(computer.totalMemory()/1024)).."K") print(" \tTotal\tFree\tUsed")
print("Free: \t"..tostring(math.floor(computer.freeMemory()/1024)).."K") io.write("Mem\t")
print("Used: \t"..tostring(math.floor((computer.totalMemory()-computer.freeMemory())/1024)).."K") io.write(tostring(math.floor(computer.totalMemory()/1024)).."K\t")
io.write(tostring(math.floor(computer.freeMemory()/1024)).."K\t")
print(tostring(math.floor((computer.totalMemory()-computer.freeMemory())/1024)).."K\t")
end end