-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix memory overflow in debugger for select targets #3265
Conversation
should |
https://airsdk.dev/reference/actionscript/3.0/flash/system/System.html privateMemory : Number totalMemory : uint At a glance, totalMemory seems like the right choice, as in it seems like the true memory usage allocated to run the program. though privateMemory is a number |
What confused me is that in my tests where I just clone a bitmap a bunch of times, Maybe I just don't understand what "directly allocated by Flash Player or AIR" means
There's also Now that I think about it maybe I should just PR these changes to OpenFL and add |
Not a bad idea |
My PR in OpenFL was merged, I'll make a new one here once I figure out the conditionals |
Please link the OpenFL issue heere as well as in the new PR, thanks! |
|
Because
openfl.System.totalMemory
is an Int, after reaching ~2.14GB (32bit int limit) the memory usage will overflow and no longer display accurate values:On Hashlink and the C++ targets we can get a more precise 64bit memory usage value, which allows us to display way higher values (and this isn't even close to the limit):
Unrelated: I wonder if it'd be worth it to use
FlxStringUtil.formatBytes()
here