Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Total RAM size of an iOS device

Tags:

Is it possible to determine actual RAM size of an iOS device?

Referring to this question Determining the available amount of RAM on an iOS device we can determine the available free memory but how to get the actual total size.

like image 833
Sohaib Avatar asked Nov 26 '13 08:11

Sohaib


People also ask

How much RAM is in an iPhone?

Surprisingly, Apple never specifies the amount of RAM in iPhones. But, in general, bigger or "Pro" versions of iPhones come with greater RAM. For example, the iPhone 13 comes standard with 4GB of RAM, whereas the Pro models offer 6GB of RAM. Undoubtedly, Apple exerts a lot more control over the entire iOS ecosystem.

How do I find out my iPhones RAM size?

From the top-left menu, open This Device → System for details about your device's RAM. For instance an iPhone 7+ has 3 GB of RAM: Note: I am not affiliated with this app or its developer.

How much RAM is on an iPhone 11?

Hardware. The iPhone 11, along with the iPhone 11 Pro, uses Apple's A13 Bionic processor, which contains a third-generation neural engine. It has three internal storage options: 64 GB, 128 GB, and 256 GB. It also has 4 GB of RAM.


2 Answers

The simplest solution to find total RAM in a device is to use NSProcessInfo:

Objective C:

[NSProcessInfo processInfo].physicalMemory 

Swift 3:

NSProcessInfo.processInfo().physicalMemory 

Swift 5:

ProcessInfo.processInfo.physicalMemory 

Note: physicalMemory gives us the information at bytes, to calculate GB, divide by the constant 1073741824.

As documented here.

like image 115
Woodstock Avatar answered Sep 19 '22 02:09

Woodstock


Slight change for Swift 3: ProcessInfo.processInfo.physicalMemory

like image 42
Swindler Avatar answered Sep 17 '22 02:09

Swindler