Search Issue Tracker
Fixed in 2019.3.X
Fixed in 2017.4.X, 2018.4.X, 2019.2.X
Votes
0
Found in
2017.4.0f1
2018.3.0a1
2018.3.14f1
2018.4.0f1
2019.1.0a1
2019.2.0a1
2019.3.0a1
Issue ID
1155192
Regression
No
[iOS] SystemInfo.systemMemorySize sometimes reports Physical Memory under-report available Device Memory
SystemInfo.systemMemorySize uses sysctl to get Physical Memory size on iOS but sysctl has not been working since iOS 9 due to Privacy changes. The fallback heuristic method sometimes returns inaccurate values for Physical Memory. Using NSProcessInfo.physicalMemory might be a better way to get Physical Memory size.
To reproduce:
1. Download attached "ios-system-memory-size.zip" project and open in Unity
2. Open "Main" scene
3. Build for iOS
4. Deploy the Xcode project to the iOS device
5. SystemInfo.systemMemorySize will be displayed in UI Text
6. Observe that in certain conditions, SystemInfo.systemMemorySize will be under-report available Device Memory
Notes:
- This is a known problem with the implementation of SystemInfo.systemMemorySize on iOS
Tested with:
- iPhone 5c, iOS: 9.3.2 - Always 1015 Physical Memory
- iPod Touch 5th Gen, iOS: 9.3.5 - Always 503 Physical Memory
- iPhone 6s Plus, iOS: 10.3.2 - Always 1985 Physical Memory
- iPhone 7, iOS: 10.2 - Always 2000 Physical Memory
- iPad Mini 4, iOS: 11.4.1 - Always 1988 Physical Memory
- iPhone 8 Plus, iOS: 12.0 - Always 2990 Physical Memory
- iPhone XR, iOS: 12.0 - Always 2813 Physical Memory
- iPad Pro, iOS: 12.1 - Always 3769 Physical Memory
Reproduced on Unity 2017.4.0f1, 2017.4.27f1, 2018.3.14f1, 2018.4.1f1, 2019.1.4f1, 2019.2.0b3 and 2019.3.0a4
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Long Prefab save times when using Unity 2022.2 and higher
- Console displays error "UnityException: Creating asset at path Assets/Scenes/ .scenetemplate failed." during scene template saving
- "Development Build" watermark is shown in non-development UWP release builds
- Console errors appear when the Inspector is set to Debug and a GameObject is selected
- A script public variable value is not used when set in the Inspector window
Add comment