I have a Flash application that requires ~130Mb of RAM and I want to run it on my Galaxy S
I've installed Froyo JPK with latest flash 10.1, but just before the end of startup procedure I always get the "exclamation circle" icon which is apparently the "out-of-memory" message in flash.
I have tried to free up the memory with task killers and memory boster, but can't get it above 175 Mb, which is obviously still not enough, since probably browser and other applications/services use it back before the flash application starts completely. Or might be also some limitation my browser in Galaxy S ? -> see EDIT below
On HTC Desire this same application works like a charm.
So I wonder...
Is there any way to get more free memory ? [EDIT: Yes, with "Chuck Norris mode" app killers, but i does not always help and it's lame]
Is there any way to get more than 311-322Mb RAM used for Applications ? [EDIT: Yes, when developpers will found out the way how to get less memory used for video codecs or even found the misterious 32Mb which are yet nowhere to be found]
Can we expect to this memory issue to be solved in future Froyo releases ? [probably only Samsung knows that, but for now it seems very unlikely]
EDIT: Found out that I get out-of-memory with every single application when it reaches 128Mb of RAM usage.
This is again specific to SGS. Looks like this is some internal max memory allocation size per application/VM
So here is another question:
Is there any way to increase this limit (might be android internal or dalvik VM related)?
no
no
no
sorry to say that...
flypubec said:
I have a Flash application that requires ~130Mb of RAM and I want to run it on my Galaxy S
I've installed Froyo JPK with latest flash 10.1, but just before the end of startup procedure I always get the "exclamation circle" icon which is apparently the "out-of-memory" message in flash.
I have tried to free up the memory with task killers and memory boster, but can't get it above 175 Mb, which is obviously still not enough, since probably browser and other applications/services use it back before the flash application starts completely. Or might be also some limitation my browser in Galaxy S ?
On HTC Desire this same application works like a charm.
So I wonder...
Is there any way to get more free memory ?
Is there any way to get more than 309Mb RAM used for Applications ?
Can we expect to this memory issue to be solved in future Froyo releases ?
Click to expand...
Click to collapse
If you need that amount of memory you should use a computer.
Its not the phone thats the probem here. its what you try to run.
//Damian
I would personally put up money to get the RAM issue resolved.
People keep saying that 324~ MB is enough. That's not the point though. The point is that Samsung advertised 512MB. Any reasonable person would assume that, like other phones containing 512MB of RAM, that the phone would have 400+MB available for general usage. 324 MB for such a power phone is dismal. I consider Samsung's claim to be a form of false advertising. Yes, technically the phone has 512MB of RAM, but not according to the reasonable expectations of a consumer. Almost half of the stated RAM isn't usable to the end user for applications. This is a problem with the phone from the standpoint of delivering the expected value to the consumer.
Dear XDA Developer Legends,
Do you think it is possible that you will be able to free up ram that is allocated to the ram disk?
Yours,
Concerned Customers
Hm, maybe its applicable for a lawsuit?
andars05 said:
I would personally put up money to get the RAM issue resolved.
People keep saying that 324~ MB is enough. That's not the point though. The point is that Samsung advertised 512MB. Any reasonable person would assume that, like other phones containing 512MB of RAM, that the phone would have 400+MB available for general usage. 324 MB for such a power phone is dismal. I consider Samsung's claim to be a form of false advertising. Yes, technically the phone has 512MB of RAM, but not according to the reasonable expectations of a consumer. Almost half of the stated RAM isn't usable to the end user for applications. This is a problem with the phone from the standpoint of delivering the expected value to the consumer.
Click to expand...
Click to collapse
the phone has 512MB and you can use all. But the system use some of it.
Its only user that cant read and understand how it work hat keep asking about it.
And this phone has more ram that most have. So yes it is enough of ram.
'If you try to runt 50+ all time you will and up with low memory.
But its the same on a computer. none complain about that.
Only that you can only see 3.5GB on windows and use that on a 32.bit system. Well now you can see 4GB and all people are happy.. but they still cant use it, but its looks good.
That the same with this phone.
If samsung did show 512MB and did show how much that was free, all people that complain would be happy. but it dont change a bit what thay can use.
yaocheng said:
no
no
no
sorry to say that...
Click to expand...
Click to collapse
That make no sense
there is no reason to get less memory with the i9000 when comparable devices like the nexus one running the same OS version has 100mb+ more free ram
DamianGto said:
the phone has 512MB and you can use all. But the system use some of it.
Its only user that cant read and understand how it work hat keep asking about it.
And this phone has more ram that most have. So yes it is enough of ram.
'If you try to runt 50+ all time you will and up with low memory.
But its the same on a computer. none complain about that.
Only that you can only see 3.5GB on windows and use that on a 32.bit system. Well now you can see 4GB and all people are happy.. but they still cant use it, but its looks good.
That the same with this phone.
If samsung did show 512MB and did show how much that was free, all people that complain would be happy. but it dont change a bit what thay can use.
Click to expand...
Click to collapse
This misses the point of my original statement. The Nexus One is advertised (along with many other phones) as having 512MB of RAM. The N1 has 380-400+MB available of RAM available for applications, as do many other phones containing 512MB of RAM.
Yes, the system does reserve some for certain system functions. Even after those functions have been reserved on other 512MB models, the vast majority is still available to the end user. This is not the case on the Galaxy S series. This is evident by the original posters comment regarding his application.
To address your Windows example: Windows 32 bit actually states that only a portion of the 4GB is available for use. I don't see in the advertisements where Samsung states "Contains 512MB -- 324MB available for actual usage"
I think most consumers, like myself, would assume that the amount of RAM advertised is directly correlated to the amount usable for applications.
Otherwise, what's the difference between a phone advertised as having 384MB and the Galaxy S? They both could have the same amount of RAM available.
andars05 said:
Windows 32 bit actually states that only a portion of the 4GB is available for use.
Click to expand...
Click to collapse
But its not the case here.
+1 for the rest.
This is what i get if I run top command from adb from a freshly booted phone:
←[H←[JMem: 296300K used, 15048K free, 0K shrd, 6968K buff, 134720K cached
CPU: 1.3% usr 2.3% sys 0.0% nic 96.2% idle 0.0% io 0.0% irq 0.0% sirq
Load average: 0.99 1.33 0.59 1/351 3109
Wonder what this "cached" means.
Can somebody pls run this on HTC desire ?
I don't think our phone has 512mb of RAM physically available to the system. I think the phone has 512mb of RAM in total but it looks like 128mb of it is graphics RAM or something. Meaning we only have 384mb available to the system. The maximum amount of RAM I can ever get free is about 175mb so I don't think that it's reasonable that the system is using about 337mb of RAM. My desktop linux system uses less RAM than that on boot.
Isn't the memory allocation for graphics dynamic?
how often does the graphics really need all that ram?
any why aren't other devices affected by this? (doesn't the GPU on nexus or milestone for example need memory allocated?)
sionyboy said:
Do you think it is possible that you will be able to free up ram that is allocated to the ram disk?
Click to expand...
Click to collapse
Please explain. Which ram disk do you mean?
Also, since it runs on linux, cant we assign some space from the internal sd (or external) to make a virtual ram disk that would be used as ram when needed? some king a paging file that we know on windows...
And if this is possible, can we assign it to video so graphism will be a little slower but app will become faster?
I think there is something we can do if we can change assignation of ram, apps, and video to make this phone way much powerful.
(just an idea...)
franklin01 said:
Also, since it runs on linux, cant we assign some space from the internal sd (or external) to make a virtual ram disk that would be used as ram when needed? some king a paging file that we know on windows...
And if this is possible, can we assign it to video so graphism will be a little slower but app will become faster?
I think there is something we can do if we can change assignation of ram, apps, and video to make this phone way much powerful.
(just an idea...)
Click to expand...
Click to collapse
There's always Compcache..that worked like a charm on the G1 and Magic.
http://forum.xda-developers.com/showthread.php?t=724960
As you can see, all other Android phones reserve some memory to the system... It's just the way it is.
the sgs kernel creates amemory blackhole, that is, it starts using memory after a certain memory address.
It does that because many things in the hardware are using fixed memory addresses to allocate their own memory which is not managed by the kernel itself and the kernel will never touch or see it.
what you call "system memory" is usually memory used and seen by the kernel, for the OS's functionality: various applications, services, daemons, kernel daemons, kernel memory itself (its not much) and some time some ramdisks.
Every phone also uses that of course, which amounts for like 80-130megs. They also often use small black holes of like a couple of megs, but that's so little that no one will notice.
The sgs makes a big blackhole. To me it's more of a design fault, but not much you can do about it I guess. It would need someone who's going to read the complete hardware sheets to bypass that, if at all possible, lol. Or samsung.
I bet they fixed the design issue in the galaxy tab and either the chip has separate dedicated memory either there's no blackhole.
Another theory why the blackhole is necessary is that there's a bug in the chip and it's messing up a portion of the memory, so this portion is left unused (blackhole'd - never seen by the kernel) for stability reasons.
i hope this gives some insight.
reference from the previously linked post:
- Galaxy S [2.1] RAM = 512 MiB | Linux = 325 MiB | Reserved = 187 MiB (with I9000XWJM2 firmware)
notice the huge black hole here (187 megs)
I used to have more than 300mb free after reboot with nexus one...
DamianGto said:
the phone has 512MB and you can use all. But the system use some of it.
Its only user that cant read and understand how it work hat keep asking about it.
Click to expand...
Click to collapse
No, *we* can't use it all , because we != system. The debate is not whether or not there is 512MB of physical memory; there could be , since Samsung advertises as having 512MB, but its not all user accessible memory. We don't know for what the system is utilizing that memory, I don't think its for loading some of the core system components; otherwise we should be left with more free RAM like other devices with 512MB of RAM (i.e Nexus One). Its more likely that 188MB is used by either the GPU and other hardware or as a Ram disk.
In contrast, other phones having 512MB of RAM don't use user allocated memory for system or hardware use (at least not the same way Samsung does). They are somehow handling it differently, maybe their GPU's and Other hardware software counterparts have dedicated memory. Whatever said, at the end of the day in the user's point of view, Galaxy S DOES NOT have 512MB of RAM as what we were all led to believe . That is pure deception !!
If they knew this was the case then they should have alerted this to the users. For-example a spec sheet for Samsung Fascinates says 512MB Flash/384MB RAM they should have advertised Galaxy S like that instead of lying through their teeth.
Hi,
i'm new to this forum, therefor a noob (yeah, i've watched the video )
And here's a first question :
I've noticed that several custom roms come with preconfigured ramdisks, and knowing that this phone "only" has 512M of ram, i guess that it could be usefull in some cases, so:
if you have tried, have you noticed a difference in performance/usage?
is it possible to add a ramdisk to a stock rom (V20o)? if yes, how? (link?)
does the OS view really a larger quantity of RAM (ie: device manager shows 1Gig of ram with a 512M ramdisk?) ?
Thank you for your futur replies
_
| |
| |
/ |___
______/ ____)
____)
____)
-------.______)
up!
Ramdisk/RAM hack
Hi/Salut
I looks to me like you're confusing ramdisk and RAM...
This post explains how to modify a ramdisk and explains what it is (by alansj): http://forum.xda-developers.com/showpost.php?p=2885020&postcount=1
"A ramdisk is basically a small filesystem containing the core files needed to initialize the system. It includes the critical init process, as well as init.rc, which is where you can set many system-wide properties."
On the other hand, the 512Mb amount of Ram remains the same. More precisely, 128Mb of those 512 are allocated to GPU, the amount of RAM left (~370Mb) is for applications/system. There are some tweaks (RAM hack, compcache...) that developpers have implemented to optimize the relatively small RAM, but no custom Rom actually increases it.
More in-depth:
RAM hack: devs modified the kernel to decrease the amount of RAM allocated to GPU (e.g: 128-32=96Mb allocated to GPU resulting in ~370+32~402Mb of RAM available for apps/system)
compcache: it virtually increases the amount of available RAM by allocating a specified amount of RAM to compressed swap. http://code.google.com/p/compcache/
Hope it helps you!
I have updated to latest ONeUI 4 Beta 2 and RAM Plus feature is active. However, I can see only 12 GB memory which is inbuilt RAM. Has anyone checked this feature and getting !2+4GB ie 16 GB memory
It's zRAM, it doesn't magically add RAM. You still have 12GB.
For starters, RAM Plus is a new feature that gives your smartphone a virtual RAM expansion with an extra 4GB of memory by utilizing some of its storage space. It was initially unveiled alongside the Galaxy A52s, so the feature was thought to be designed for mid-range phones that could benefit the most from this capability.
Click to expand...
Click to collapse
Uses storage space to create virtual ram like the old page file in Windows.
The feature may be more useful in mid-range and low-end phones, such as Samsung's Galaxy M and A series. However, it may not offer much value for smartphones with 16GB of RAM, such as the Galaxy S21 Ultra.
Click to expand...
Click to collapse
Since it is hard to push the S21 Ultra to use its full 12GB/16GB of RAM I cannot see it making much of a difference.
Source: https://www.androidcentral.com/samsung-galaxy-s21-ram-plus-update
lywyn said:
Uses storage space to create virtual ram like the old page file in Windows.
Click to expand...
Click to collapse
This is not accurate, it is not using storage.
skymera said:
This is not accurate, it is not using storage.
Click to expand...
Click to collapse
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
It uses storage memory to create a 4GB of virtual RAM. You cannot create more RAM than you have to you page it out to storage memory. Windows NT had a page file for the exact same thing. It addres memory addresses that are mapped to the storage of teh device.
Where else can it get 4GB from?
lywyn said:
View attachment 5427591
View attachment 5427595
View attachment 5427607
View attachment 5427609
View attachment 5427611
It uses storage memory to create a 4GB of virtual RAM. You cannot create more RAM than you have to you page it out to storage memory. Windows NT had a page file for the exact same thing. It addres memory addresses that are mapped to the storage of teh device.
Where else can it get 4GB from?
Click to expand...
Click to collapse
Where? zRAM has existed for years.
If Samsung really are using a swap file of sorts then that is a dumbass decision.
zRAM would add more power consumption by doing all the compression on the fly and drain the battery faster.
Ram plus disable method
I stumbled upon this thread since I was wondering what RAM plus should be. After rooting my S21 Ultra I could use Franco kernel manager to check zRAM and big surprise: zRAM is enabled and exactly 4 GB.
I also checked the available swap with
Code:
free -m
but it only shows zRAM. If I disable zRAM the command it shows 0 meaning there is no swap of any kind. Either Samsung uses special non-standard Linux stuff or more likely: it is zRAM.
That means 4 GB out of my 12 GB RAM are being compressed and to be honest: I don't see any point in doing that with 12 GB of RAM. Apparently Android uses only 10,3 GB (1,7 GB is reserved. I think the reserved memory could be a Samsung thing or allocated to the VRAM of the graphic processor as Android itself only sees 10,3 GB).
The information about "using the internal storage" to expand the RAM (= swap) seems to be misleading. There is only zRAM which expands the RAM by compressing a part of it. Adding more CPU usage but definitely not affecting the internal storage.
By using
Code:
swapoff /dev/zram0
I've now disabled zRAM upon booting and I'll see how it goes. The 4 GB Samsung shows seem to be hard-coded. Even with zRAM disabled it still says that RAM plus exists. Of course all of this requires rooting.
If you want to enable zRAM again either reboot or use
Code:
swapon /dev/zram0
I've spent about an hour of research about this. Maybe it helps someone
RAM Plus should be able to be disabled on OneUI 4.1
On 16Gb/512Gb versions, it makes even less sense...
Guys wake up, your phones have 12Gb or even 16GB RAM... YOU DO NOT NEED MORE... I know it is tempting to make your phone have 4gb more but it is not necessary for 1, and for 2, it will eventually backfire at you.
What do I mean by backfire?
A long time ago, an app was invented by some Russians that would utilize the phones SD card as extra ram. It worked and was a superb addition to a phone with 1GB ram or less. However after using it for a few short months, it would fry the SD card either entirely, or make it READ ONLY. The latter being better as you could at least transfer your data out of the SD card. Then manufacturers started making phones with better ram management and also MORE ram... So eventually this type of software was obsolete because of the damage it would cause to your internal memory.
This RAM PLUS function is a knife with a blade on both sides. It is FREE ram for YOU, and a faster purchase of a new phone for Samsung. If the function does not fry your internal memory, it will surely decrease its speed over time. How much time, is a mystery. The question is, do you want to find out?
RedWave31 said:
RAM Plus should be able to be disabled on OneUI 4.1
On 16Gb/512Gb versions, it makes even less sense...
Click to expand...
Click to collapse
I agree. Its use is for low memory devices that would have multitasking issues otherwise. But with 12 or 16 GB of RAM it does not make sense except you have serious issues with apps getting killed due to low RAM
babyboy3265 said:
Guys wake up, your phones have 12Gb or even 16GB RAM... YOU DO NOT NEED MORE... I know it is tempting to make your phone have 4gb more but it is not necessary for 1, and for 2, it will eventually backfire at you.
What do I mean by backfire?
A long time ago, an app was invented by some Russians that would utilize the phones SD card as extra ram. It worked and was a superb addition to a phone with 1GB ram or less. However after using it for a few short months, it would fry the SD card either entirely, or make it READ ONLY. The latter being better as you could at least transfer your data out of the SD card. Then manufacturers started making phones with better ram management and also MORE ram... So eventually this type of software was obsolete because of the damage it would cause to your internal memory.
This RAM PLUS function is a knife with a blade on both sides. It is FREE ram for YOU, and a faster purchase of a new phone for Samsung. If the function does not fry your internal memory, it will surely decrease its speed over time. How much time, is a mystery. The question is, do you want to find out?
Click to expand...
Click to collapse
I totally agree, but I have to add two things: 4 GB of zRAM ≠ 4 GB "more RAM". It means that 4 GB are being compressed which could result in something like 5.2 GB of RAM instead of 4. Just like if you had 4 GB of RAM and compress it, you would have something like 2.8 GB instead. So zRAM is not adding something but compressing a small portion.
The second thing is that Samsung utilises zRAM but not (z)swap. Meaning that while the RAM is being compressed, there is no swap file on the internal storage despite Samsung listing that in its FAQ. zRAM will not hurt your internal storage, it will have no direct negative effects on longevity of any component. The processor will only compress data that is already in RAM and compress it there. There is no offloading to the internal storage. The only disadvantage is more CPU usage and time to load/store something due to the compression.
The only things that would see negative impacts with zRAM is the CPU temperature (but it's so low, it's negligible) and battery consumption, therefore battery longevity in the longterm. But both are very minor
Macusercom said:
I agree. Its use is for low memory devices that would have multitasking issues otherwise. But with 12 or 16 GB of RAM it does not make sense except you have serious issues with apps getting killed due to low RAM
I totally agree, but I have to add two things: 4 GB of zRAM ≠ 4 GB "more RAM". It means that 4 GB are being compressed which could result in something like 5.2 GB of RAM instead of 4. Just like if you had 4 GB of RAM and compress it, you would have something like 2.8 GB instead. So zRAM is not adding something but compressing a small portion.
The second thing is that Samsung utilises zRAM but not (z)swap. Meaning that while the RAM is being compressed, there is no swap file on the internal storage despite Samsung listing that in its FAQ. zRAM will not hurt your internal storage, it will have no direct negative effects on longevity of any component. The processor will only compress data that is already in RAM and compress it there. There is no offloading to the internal storage. The only disadvantage is more CPU usage and time to load/store something due to the compression.
The only things that would see negative impacts with zRAM is the CPU temperature (but it's so low, it's negligible) and battery consumption, therefore battery longevity in the longterm. But both are very minor
Click to expand...
Click to collapse
That was a nice in depth explanation. Thank you!