mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2025-04-21 19:31:52 -04:00
use System.totalMemoryNumber
This commit is contained in:
parent
d31ef12363
commit
630e066ab1
1 changed files with 3 additions and 8 deletions
|
@ -46,16 +46,11 @@ class MemoryUtil
|
|||
|
||||
/**
|
||||
* Calculate the total memory usage of the program, in bytes.
|
||||
* @return Int
|
||||
* @return Float
|
||||
*/
|
||||
public static function getMemoryUsed():#if cpp Float #else Int #end
|
||||
public static function getMemoryUsed():Float
|
||||
{
|
||||
#if cpp
|
||||
// There is also Gc.MEM_INFO_RESERVED, MEM_INFO_CURRENT, and MEM_INFO_LARGE.
|
||||
return cpp.vm.Gc.memInfo64(cpp.vm.Gc.MEM_INFO_USAGE);
|
||||
#else
|
||||
return openfl.system.System.totalMemory;
|
||||
#end
|
||||
return openfl.system.System.totalMemoryNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue