Galaxy Nexus missing physical memory

Search This thread

Chirality

Senior Member
Sep 6, 2008
651
127
Cambridge, MA
Ever since the first tests of the Galaxy Nexus came out we've wondered why the kernel reports only a bit over 700MB of available physical memory when the hardware is supposed to have 1GB of memory. Has there been any progress in figuring out where this missing 300MB of memory went? I've been trying to figure this out but haven't had any luck. The following is the output from dmesg:

Code:
<6>[    0.000000] Initializing cgroup subsys cpu
<5>[    0.000000] Linux version 3.0.8-gaaa2611 ([email protected]) (gcc version 4.4.3 (GCC) ) #1 SMP PREEMPT Mon Nov 21 19:06:15 PST 2011
<4>[    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387f
<4>[    0.000000] CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
<4>[    0.000000] Machine: Tuna
<6>[    0.000000] Reserving 16777216 bytes SDRAM for VRAM
<4>[    0.000000] Memory policy: ECC disabled, Data cache writealloc
<6>[    0.000000] OMAP4460 ES1.1
<6>[    0.000000] SRAM: Mapped pa 0x4030d000 to va 0xfe40d000 size: 0x1000
<6>[    0.000000] SMC: Allocated workspace of 0x300000 Bytes at (0xbfd00000)
<7>[    0.000000] On node 0 totalpages: 182272
<7>[    0.000000] free_area_init_node: node 0, pgdat c07940e0, node_mem_map c0913000
<7>[    0.000000]   Normal zone: 256 pages used for memmap
<7>[    0.000000]   Normal zone: 0 pages reserved
<7>[    0.000000]   Normal zone: 32512 pages, LIFO batch:7
<7>[    0.000000]   HighMem zone: 1792 pages used for memmap
<7>[    0.000000]   HighMem zone: 147712 pages, LIFO batch:31
<6>[    0.000000] PERCPU: Embedded 7 pages/cpu @c111a000 s6816 r8192 d13664 u32768
<7>[    0.000000] pcpu-alloc: s6816 r8192 d13664 u32768 alloc=8*4096
<7>[    0.000000] pcpu-alloc: [0] 0 [0] 1 
<4>[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 180224
<5>[    0.000000] Kernel command line: console=ttyFIQ0 androidboot.console=ttyFIQ0 mem=1G vmalloc=768M omap_wdt.timer_margin=30 no_console_suspend androidboot.serialno=0146BF510D00F01F androidboot.bootloader=PRIMEKK15 androidboot.baseband=I515.EK02 lcd_bootfb=0xbea70000 mms_ts.panel_id=18 androidboot.cdma=I515.EK05 androidboot.macaddr=2C:44:01:C8:B6:AF 
<6>[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
<6>[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
<6>[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
<6>[    0.000000] Memory: 512MB 200MB = 712MB total
<5>[    0.000000] Memory: 711096k/711096k available, 337480k reserved, 598016K highmem

You can see that the kernel is reserving 16MB of physical memory for VRAM, 1KB for SRAM, and 300KB for SMC. But that still leaves around 300MB of reserved memory unaccounted for. Any idea what this could be?
 

Chirality

Senior Member
Sep 6, 2008
651
127
Cambridge, MA
128mb can be accounted for because it is reserved for the gpu.

Where do you see that? According to the kernel log only 16MB is reserved for VRAM.

That SMC number (0x300000) is a hexadecimal number. That is way more than 300KB

Sorry my mistake. That's 3MB for SMC and 4KB for SRAM. That doesn't change anything though, there's still around 300MB unaccounted for.
 

adrynalyne

Inactive Recognized Developer
Dec 13, 2008
10,950
6,471
Where do you see that? According to the kernel log only 16MB is reserved for VRAM.



Sorry my mistake. That's 3MB for SMC and 4KB for SRAM. That doesn't change anything though, there's still around 300MB unaccounted for.

I should have rephrased. I am not entirely sure but:


Check the specs for the Hummingbrid soc with the same GPU. The GPU is designed to have 128mb reserved. The Razr and Bionic are the same. I am assuming a bit, but I see no reason that TI would gimp the gpu with less ram. I think its even more likely when I've seen Razr and Bionic owners have this same question (where is all the ram).

I am still looking for 100% confirmation.
 
Last edited:

adrynalyne

Inactive Recognized Developer
Dec 13, 2008
10,950
6,471
If I look back to every Android device I've owned, there has always been an amount of at least ~120+mb that cannot be accounted for. Even my Bolt with 768mb of ram only had ~560mb usable. So the OS has to be reserving at least some for itself. I don't think ICS is more aggressive for this, Bionic owners report similar usable amounts of ram as we do.
 

Chirality

Senior Member
Sep 6, 2008
651
127
Cambridge, MA
If I look back to every Android device I've owned, there has always been an amount of at least ~120+mb that cannot be accounted for. Even my Bolt with 768mb of ram only had ~560mb usable. So the OS has to be reserving at least some for itself. I don't think ICS is more aggressive for this, Bionic owners report similar usable amounts of ram as we do.

If I remember correctly, the kernel logs that supercurio posted for the RAZR shows around 930MB of usable RAM.
 

adrynalyne

Inactive Recognized Developer
Dec 13, 2008
10,950
6,471
If I remember correctly, the kernel logs that supercurio posted for the RAZR shows around 930MB of usable RAM.

It may show that. But whats available as usable ram to the end user is different.

AjQ2-oYCEAE9T1y.png
 

Chirality

Senior Member
Sep 6, 2008
651
127
Cambridge, MA
It may show that. But whats available as usable ram to the end user is different.

AjQ2-oYCEAE9T1y.png

Is that running ICS? Maybe there's been a kernel change that affects how much memory is reported as available vs. reserved during boot.

Here's the dmesg screenshot from supercurio for the RAZR that I was talking about: http://twitpic.com/7c659r/full

The logging order is completely different from my Galaxy Nexus log. For the RAZR, right off the bat it reports 261888 total pages (1023MB) of memory. On my Galaxy Nexus, near the very beginning it reports 182272 total pages (712MB) of memory, so some has already been reserved. Not sure why there's this discrepancy in the logs.
 

adrynalyne

Inactive Recognized Developer
Dec 13, 2008
10,950
6,471
I believe it is ICS, yes. I asked the closest person I knew owning a Razr who has been fiddling with it. Maybe dmesg is different in ICS? Whats important is whats shown as usable to the end user. So maybe someone can scrounge up the above picture from Gingerbread and we can compare?
 

Chirality

Senior Member
Sep 6, 2008
651
127
Cambridge, MA
I believe it is ICS, yes. I asked the closest person I knew owning a Razr who has been fiddling with it. Maybe dmesg is different in ICS? Whats important is whats shown as usable to the end user. So maybe someone can scrounge up the above picture from Gingerbread and we can compare?

Just checked a stock RAZR at a Verizon store and it also reports around 700MB of usable memory. So this isn't unique to the GN or to ICS, but I would still like to figure out what that 300MB is reserved for.
 

coolbho3000

Retired Senior Recognized Developer
Dec 26, 2008
899
784
Hey Chirality, the rest has been taken by the GPU, Ducati subsystem and the Ion heap. See arch/arm/mach-omap2/board-tuna.c for the bulk of it:

Code:
#define OMAP_TUNA_ION_HEAP_SECURE_INPUT_SIZE	(SZ_1M * 90)
#define OMAP_TUNA_ION_HEAP_TILER_SIZE		(SZ_128M - SZ_32M)
#define OMAP_TUNA_ION_HEAP_NONSECURE_TILER_SIZE	SZ_32M
#define OMAP_TUNA_ION_HEAP_LARGE_SURFACES_SIZE	SZ_32M
#define PHYS_ADDR_SMC_SIZE	(SZ_1M * 3)
#define PHYS_ADDR_SMC_MEM	(0x80000000 + SZ_1G - PHYS_ADDR_SMC_SIZE)
#define PHYS_ADDR_DUCATI_SIZE	(SZ_1M * 105)
#define PHYS_ADDR_DUCATI_MEM	(PHYS_ADDR_SMC_MEM - PHYS_ADDR_DUCATI_SIZE -\
				OMAP_TUNA_ION_HEAP_SECURE_INPUT_SIZE)

That accounts for most of the missing memory.
 

mobilehavoc

Senior Member
Mar 12, 2006
2,172
355
Hey Chirality, the rest has been taken by the GPU, Ducati subsystem and the Ion heap. See arch/arm/mach-omap2/board-tuna.c for the bulk of it:

Code:
#define OMAP_TUNA_ION_HEAP_SECURE_INPUT_SIZE	(SZ_1M * 90)
#define OMAP_TUNA_ION_HEAP_TILER_SIZE		(SZ_128M - SZ_32M)
#define OMAP_TUNA_ION_HEAP_NONSECURE_TILER_SIZE	SZ_32M
#define OMAP_TUNA_ION_HEAP_LARGE_SURFACES_SIZE	SZ_32M
#define PHYS_ADDR_SMC_SIZE	(SZ_1M * 3)
#define PHYS_ADDR_SMC_MEM	(0x80000000 + SZ_1G - PHYS_ADDR_SMC_SIZE)
#define PHYS_ADDR_DUCATI_SIZE	(SZ_1M * 105)
#define PHYS_ADDR_DUCATI_MEM	(PHYS_ADDR_SMC_MEM - PHYS_ADDR_DUCATI_SIZE -\
				OMAP_TUNA_ION_HEAP_SECURE_INPUT_SIZE)

That accounts for most of the missing memory.
Interesting - what is the Ducati system?
 

bilalf021

New member
Apr 23, 2012
3
0
There's ~300MB reserved exclusively for the OS itself.


Hey but that doesnt explain why like 200-300 mbs are always in use by the OS from the remaining like 700mbs, I know widgets and that take some but like for exanple on my Xperia S there is only 697 mbs that showup and from that when I kill all tasks there is always abt 280+ mbs in use and in task killers I see android OS taking abt 70 mbs then whats the sharing for
 

adrynalyne

Inactive Recognized Developer
Dec 13, 2008
10,950
6,471
Hey but that doesnt explain why like 200-300 mbs are always in use by the OS from the remaining like 700mbs, I know widgets and that take some but like for exanple on my Xperia S there is only 697 mbs that showup and from that when I kill all tasks there is always abt 280+ mbs in use and in task killers I see android OS taking abt 70 mbs then whats the sharing for

Read the above responses.
 

adrynalyne

Inactive Recognized Developer
Dec 13, 2008
10,950
6,471
I thought it was common knowledge that the system reserves some ram for the gpu? I've come to expect this already after owning several android phones

Sent from my Galaxy Nexus using XDA

The thing is, there is a lot more reserved for the gpu on omap4 devices. This confuses folks.
 

Top Liked Posts