mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2025-01-09 06:22:14 -05:00
get Float instead of Int in cpp (Float is 64-bit in so it works easier than Int64)
This commit is contained in:
parent
9a78060329
commit
ade4aeb3f7
1 changed files with 2 additions and 2 deletions
|
@ -48,11 +48,11 @@ class MemoryUtil
|
||||||
* Calculate the total memory usage of the program, in bytes.
|
* Calculate the total memory usage of the program, in bytes.
|
||||||
* @return Int
|
* @return Int
|
||||||
*/
|
*/
|
||||||
public static function getMemoryUsed():Int
|
public static function getMemoryUsed():#if cpp Float #else Int #end
|
||||||
{
|
{
|
||||||
#if cpp
|
#if cpp
|
||||||
// There is also Gc.MEM_INFO_RESERVED, MEM_INFO_CURRENT, and MEM_INFO_LARGE.
|
// There is also Gc.MEM_INFO_RESERVED, MEM_INFO_CURRENT, and MEM_INFO_LARGE.
|
||||||
return cpp.vm.Gc.memInfo(cpp.vm.Gc.MEM_INFO_USAGE);
|
return cpp.vm.Gc.memInfo64(cpp.vm.Gc.MEM_INFO_USAGE);
|
||||||
#else
|
#else
|
||||||
return openfl.system.System.totalMemory;
|
return openfl.system.System.totalMemory;
|
||||||
#end
|
#end
|
||||||
|
|
Loading…
Reference in a new issue