Freeing more ram on Galaxy S - Galaxy S I9000 Android Development

Hypothesis:
The memory for this device is contiguous with memory holes. This holes are for DMA for front/back camera, video decoding/encoding, etc. In 99.99% of time this is wasted memory.
Proposal:
Why not allocating all ram and dynamically allocating memory for DMA only when needed?
For example this could be like this:
1.The phone boots and the mm allocates all memory but lies the driver for camera that he could use a portion of ram for DMA
2.The system use normally all memory (maybe allocating last the reserved memory)
3.The user starts the camera
4.A hook in camera's driver instruct the mm that he needs the reserved memory
5.The MM frees a portion of ram(other than the one needed by the camera and equal with that) and moves everything from the reserved memory in that
6.The MM updates it's maps(virtual memory ↔ real memory)
7.The camera uses normally in DMA the reserved memory
8.The user closes the camera, the camera driver notifies the MM that he doesn't need memory anymore
9.The MM allocates normally the reserved memory
Pros: You'll have like 50% more ram in user space
Cons: Some lag when starting camera
I'm ready to start implementing this but I don't have lots of experience with the linux's mm and I don't really know if this is possible so I'm asking:
How crazy this idea is and it could be implemented? And if yes, how hard?

WOW! Your the first to suggest it. After everybody else here on forum, that is.

dupel said:
WOW! Your the first to suggest it. After everybody else here on forum, that is.
Click to expand...
Click to collapse
Yes, I know, the idea is not revolutionary or smth ) but I'm ready to try to implement it...
So please respond only if you can provide some useful information.

Not sure anyone really knows how easy it is to do for sure, but it has been mentioned a few times (but sounds like you have done it in further detail).
Personally, I've always believed that it's something which Samsung is working on, but maybe not. Could be awesome if you managed to make it work reliably.

Check out Hardcore's Speedmod kernel here in the development section.
His kernel gives you 341 RAM instead of the default 304. Might give you some ideas.

I know this isn't a bounty thread, but I would be willing to donate $20 if you could get this working. I wouldn't mind a slightly delay when launcher camera. I'd much rather have more free RAM.

andars05 said:
I know this isn't a bounty thread, but I would be willing to donate $20 if you could get this working. I wouldn't mind a slightly delay when launcher camera. I'd much rather have more free RAM.
Click to expand...
Click to collapse
I seriously think Samsung messed up a very good phone by allotting ONLY 512 MB ram. With 16/8 GB at their disposal, they could have easily allotted at least 1 gb

ragin said:
I seriously think Samsung messed up a very good phone by allotting ONLY 512 MB ram. With 16/8 GB at their disposal, they could have easily allotted at least 1 gb
Click to expand...
Click to collapse
+1 here!
I have the 16GB version so I wish Sammy gave this version at least 2GB RAM and 1 GB ROM

android.francis said:
+1 here!
I have the 16GB version so I wish Sammy gave this version at least 2GB RAM and 1 GB ROM
Click to expand...
Click to collapse
Can any developer DO THIS?
Seems simple. I think you need hack the pit file.

hi . . .
I dont want to be rude, but seeing these comments I couldn't stop myself -
Dudes, if you dont know what you are talking about STFU!!!
Seriously?? Allocate more to RAM from 16/8 GB??????? And edit the PIT file for this???? I am assuming that you all would've used computers, are you allocating more to RAM from the free space in your Hard Disk?? What you are suggesting is the same!!!
Please think for a moment before you post stuff.
And to the original query regarding how hard this would be - it would be pretty hard. You will have to touch upon everything that uses and reserves RAM. And this would also include modifying firmware of individual components on the phone. And if there are parts in this for which Samsung has not released source code, it would be very difficult. Not to say that - you could end up damaging the phone.
Good thoughts - but it would need a lot of work to get going.
Cheerios!!

Actually, using a swap partition on flash isn't that bad an idea, they are low latency. It would be pretty slow compared to physical ram though
Sent from my GT-I9000 using XDA App

coooolboyz said:
hi . . .
I dont want to be rude, but seeing these comments I couldn't stop myself -
Dudes, if you dont know what you are talking about STFU!!!
Seriously?? Allocate more to RAM from 16/8 GB??????? And edit the PIT file for this???? I am assuming that you all would've used computers, are you allocating more to RAM from the free space in your Hard Disk?? What you are suggesting is the same!!!
Please think for a moment before you post stuff.
And to the original query regarding how hard this would be - it would be pretty hard. You will have to touch upon everything that uses and reserves RAM. And this would also include modifying firmware of individual components on the phone. And if there are parts in this for which Samsung has not released source code, it would be very difficult. Not to say that - you could end up damaging the phone.
Good thoughts - but it would need a lot of work to get going.
Cheerios!!
Click to expand...
Click to collapse
My response: VIRTUAL RAM. And yes, I think before I post. My response was more of wishful thinking. So as an added response: ANALYZE and comprehend BEFORE you react. And I orginally was not suppose to reply but similar to you, I JUST COULDN'T STOP MYSELF
Now as for the topic of more RAM, I said before to check out Hardcore's SPEEDMOD KERNEL. It is fully functional and your RAM goes from 304MB to 341MB. Yes, it is hard but Hardcore already did it.

Related

"ReadyBoost" for Android?

Hello,
Why isnt it possible to use SDCRAM as sort of RAM in android? same as VISA/7 Using ReadyBoost to expand the ram with an USB disk on keys?
thanks!
Why would you want that?
since you only use flash based memory anyway: that's called swaping
And is Swap enabled in all froyo roms today?
rommark said:
And is Swap enabled in all froyo roms today?
Click to expand...
Click to collapse
But why would you need it? You have 512MB of RAM, with a clean boot you have around 200-220MB of it free for whatever you want to do with it. Not enough for you?
martino2k6 said:
But why would you need it? You have 512MB of RAM, with a clean boot you have around 200-220MB of it free for whatever you want to do with it. Not enough for you?
Click to expand...
Click to collapse
won't heavy 3d games eat that?
rommark said:
won't heavy 3d games eat that?
Click to expand...
Click to collapse
No. Smartphones =/= PCs. And if you are really out of space for a short amount of time, unneeded processes get killed automatically. Swap was only really needed on the G1 but definitely not on the Desire.
rommark said:
won't heavy 3d games eat that?
Click to expand...
Click to collapse
No, that's a bit too much even for a game... unless the code has memory leaks. With so much RAM it'd make more sense to use ramdisk (but who knows for what good use)
martino2k6 said:
No, that's a bit too much even for a game... unless the code has memory leaks. With so much RAM it'd make more sense to use ramdisk (but who knows for what good use)
Click to expand...
Click to collapse
RamDisk could be insane for 3d gaming as then the textures would have fast extraction means less delay in rendering....
What Readyboost is NOT
Hey folks. I've only recently discovered Readyboost as I'm primarily a Linux guy. I got all hot and bothered about it immediately as well as it is (despite Microsofts constant onslaught of horrific failures) an absolutely brilliant and elegant technology/idea.
HOWEVER!!!
Nearly everyone is confused about what RB actually does, so I thought I'd take a minute to explain.
ReadyBoost is NOT swap. NOT SWAP!, not swap.
Swap is not something to get excited about, it is a last resort for when you're out of RAM and it's excruciatingly slow. In the land of IT, one of the first things we check for when a server is experiencing horrible performance, is "IS THIS MACHINE SWAPPING". Everyone's gotta learn that swap, while it is more useful than "not enough memory" it is nor more useful than utilizing the memory you already have, and it will always result in poor performance.
ReadyBoost is an additional disc cache for small, non-sequential reads/writes. It works with your existing FS cache but is faster in some cases because FLASH has a much lower seek time. Most FLASH chips have a seek time of <1ms while most rotational discs have a seek time of around 8ms. This adds up on a large number of small non-sequential r/w.
ReadyBoost takes any caching operations which fit it's strength profile (small, non-sequential) and offloads them to your FLASH device. This can increase load speed of some files/application dramatically (2-20x faster).
So, when someone asks you if they can use Readyboost because they don't have enough memory, please, take a moment to explain that RB is not swap, but is in fact a supplementary disc cache for small, non-sequential reads and writes.
That said, I haven't had time to dig into the question of whether or not RB would benefit Linux FS's.
I know this is a really old thread but I just wanted to put my two cents in. Memory boosting apps like ReadyBoost do have a viable purpose. That is keeping older hardware viable as minimum specs increase. There is an Android app that is equivilant to ReadyBoost called Roehsoft RAM Expander. There are mixed reviews for its performance but that is to be expected. If this app helps my aging 8227_Demo head unit work well enough for me to not replace it I will update this post.

[Q to devs and everyone]what is the max RAM amount we can get from galaxy s?

i have started my own and read every topic about why we could not see all the ram as user available (329 instead of 512) .. first i compared galaxy s with tab but it turned out tab has 640 Mb of real memory in total.. but i also have seen it was possible to add more memory about 40 Mb to the user available ram .. and i also learned there is also a part which is not used and called "blackhole" approximitely another 40 Mb..
so i believe it is possible to make some adjustments to improve the weakest (according to me) part of our galaxy s.. would some devs please mind trying this for us and share it?
We don't need the RAM (yet)
There are a lot of developers who try to get more out of our SGS's. For instance Juwe/ GingerReal increases the RAM to around 340MB.
Appearently Google thinks we don't need the full potential RAM and that's why they made it with a default of 300-330MB. Still still most developers agree on XDA that we should be able to acces the other 160MB because it doesn't do anything.
Until then we'll just have to wait.
even 340 Mb instead of 329 makes a difference .. i cant think what would happen with 380 or 400 or maybe even more..
because as far as i understood from what i have read; 128 memory is reserved for some drivers and capturing video is taking most of it.. i am taking a video maybe once in 2 monts.. but i am using my widgets, apps, playing my games everyday.. so if was asked to choose i would love to have that memory reserved for video taking..
edit:typo
First of all, the amount of RAM is NOT related to the ROM....
The kernel makes the difference...
In general the max amount of RAM in Gingerbread is 340MB, cuz if we go over the phone will become unstable and we'll break some functions like 720p recording....
In Froyo we used to reach max of 350MB without issues
just curiosity;
galaxy s2 and galaxy s has the same rams with different amounts.. what would happen if we soldered the 1gb ram to galaxy s? would it recognize it without any software tuning? or would we just kill the phone completely? or would still see 329 ?
simone201 said:
First of all, the amount of RAM is NOT related to the ROM....
The kernel makes the difference...
In general the max amount of RAM in Gingerbread is 340MB, cuz if we go over the phone will become unstable and we'll break some functions like 720p recording....
In Froyo we used to reach max of 350MB without issues
Click to expand...
Click to collapse
so is it possible to disable video recording completely and having lots of more Mb?
_delice_doluca_ said:
just curiosity;
galaxy s2 and galaxy s has the same rams with different amounts.. what would happen if we soldered the 1gb ram to galaxy s? would it recognize it without any software tuning? or would we just kill the phone completely? or would still see 329 ?
Click to expand...
Click to collapse
Do you want to instert 1GB ram into our SGS? I dunno sincerely what will happen.....
_delice_doluca_ said:
so is it possible to disable video recording completely and having lots of more Mb?
Click to expand...
Click to collapse
Probably yes, i am not a kernel expert, i am only a rom cooker/recognised developer, so my knowledge on kernels is very basic....
Maybe you'd better directly ask to a kernel dev like hardcore, nikademus, chainfire....
simone201 said:
Do you want to instert 1GB ram into our SGS? I dunno sincerely what will happen.....
Click to expand...
Click to collapse
i would really want that but i am sure its not as easy as soldering the gps antenna.. i have read about a HTC device getting a memory upgrade to 128Mb from 64 in xda forum.. so technically there is no impossible but i wonder what else need to be done after soldering the ram? software adjustments (kernel maybe?), or any more hardware changes ?
simone201 said:
Probably yes, i am not a kernel expert, i am only a rom cooker/recognised developer, so my knowledge on kernels is very basic....
Maybe you'd better directly ask to a kernel dev like hardcore, nikademus, chainfire....
Click to expand...
Click to collapse
thanks for tip, i will ask them..
i am really feeling bad about this ram issue.. every web page is showing nexus, galaxy s, galaxy tab have 512 Mb of ram.. but the memory dedicated for users is far less than the other 2 phones in galaxy s ... so it bothers me.. is there anyone who returns their phones to samsung and gets the money back?
first i believed somehow it was possible to use most of the ram with some software adjustement but then i realised even quadrant shows the total amount of ram memory is only 384 mb (and there is a part which is not used at all) ..

NS4G's ram sized 512mb? or 345mb?

well... i just came from Evo4G and im very new with samsung with android..
i didn't bother to check when i first got the phone but right after my rooting process and installation of Miui 1.9.2, i installed perfect system monitor app and put the widget on my main screen and it showed 345mb of ram and only had 49mb free ram..
i was like WTF!! but is this normal? i thought NS4G came with 512mb?
is there a fix?
i do believe the Nexus comes with 512 ram. sounds like theres some setting displaying wrongly
It does have 512 RAM
I've read about this very issue on other forums before.
Some people speculated that it limited the RAM on purpose because the OS doesn't need it all and later versions of the OS would need it.
But ultimately I saw someone post that said that the GPU requires a certain amount of RAM, and so it is almost like partitioned and is unavailable for the rest of the system.
Development? Nope. Thread closed.
And for the record, Irrowley is correct. It is allocated to the SGX 540.
lrrowley said:
I've read about this very issue on other forums before.
Some people speculated that it limited the RAM on purpose because the OS doesn't need it all and later versions of the OS would need it.
But ultimately I saw someone post that said that the GPU requires a certain amount of RAM, and so it is almost like partitioned and is unavailable for the rest of the system.
Click to expand...
Click to collapse

[Q] Unlock 100% of RAM on a Rhodium 100

Is there any way to unlock htc rhodium's RAM from 288 to 512 ? As I found that this device has ( 288 MiB , 188.21MiB accessible ) RAM capacity. Look here:
http://pdadb.net/index.php?m=pdacomparer&id1=1751&id2=1931
lol, no. You can't just shove in more RAM, it's not a computer. Not made to be expandable...
then how about this??? see the spec.
http://www.howardforums.com/showthr...ith-AWS-3G-1700-2100-175-Today-Only-CanadaGSM
ciling said:
then how about this??? see the spec.
http://www.howardforums.com/showthr...ith-AWS-3G-1700-2100-175-Today-Only-CanadaGSM
Click to expand...
Click to collapse
A lie? I can say my TP2 has 1gb of RAM, doesn't mean it's true.
Edit - click on their specs link below. It's a misprint.
http://www.canadagsm.ca/HTC/HTC-Touch-Pro-2/
how about this? is it the possible way to unlock the hidden ram?
http://forum.xda-developers.com/showthread.php?t=667674
ciling said:
how about this? is it the possible way to unlock the hidden ram?
http://forum.xda-developers.com/showthread.php?t=667674
Click to expand...
Click to collapse
Do you even read what you're posting?
mweirauch said:
The assumptions made in the first thread are quite adventurous.
The Topaz only has 288MB RAM. Nothing more, nothing less.
That is 32MB of SMI memory soldered into the SoC (the MSM720xA) which is likely of fast SRAM nature. Then 2x128MB (external) EBI memory of slower SDRAM nature. On newer Topaz (as we've seen in the linux-msm kernel adventures) there can also be just 1x256MB EBI memory bank.
The 32MB bank is used entirely by the system and parts of the upper megabyte range of the first 128MB EBI memory as well. (Radio firmware, framebuffer memory, ...) The second bank is - as known until now - unused by the system and is available as RAM entirely.
Regarding memory setup: Every OEM is supposed to provide an OEMAddressTable definition for ARM based devices which is then used to initialize the processors MMU. This address table provides mappings between WinCEs virtual address range and the physical (memory) addresses. It might be possible to tweak that table when cooking the rom, but it's also very likely that malfunctions can appear by doing so. Really not worth the effort as the engineers have likely tuned it to the best already and you could gain perhaps - if possible at all - just some MB.
Let's be happy that we have the amount of memory that we have.
Click to expand...
Click to collapse
I read, but still hope for miracle from anyone...
Unless someone magically finds a radio that uses less memory and allows for more "free ram" (lay man terms and take the 2.22.27.08 radio for HTC Dream/Sapphire as an example which gained 14mb for system use), there really isn't much you can do other than remapping kernel memory banks available for camera/graphics/etc..
mweirauch explained phone memory pretty well in my opinion, and there are threads like this in almost every device section
e334 said:
there are threads like this in almost every device section
Click to expand...
Click to collapse
Everyone wants a magical placebo that will make their phones run 10,000x faster...
I guess it's human nature. Oh well.

How much free RAM do you guys have?

Is that normal? How much free RAM do you guys have?
doesn't look like it, but mine is the same. I believe it is the lollipop memory leak issue...so as usual we just have to wait it out
Sucks that just as we are finally seeing 3 Gig of RAM we end up in the same situation as when we had 2Gig ?
I have not upgraded to to 2015 Flagship Standard yet but ...
I was hoping to START at the beginning of Boot Up with about
1.7 -2 GIGs of free RAM for Tasking etc.
I think " upgrading" to Lollipop on many Devices could create more problems than it solves - right ?
And the supposed Wifi Calling and VoLTE are not going to work
because they are Carrier Specific Software which must come directly from your Service Provider.
Free RAM is UNUSED/WASTED RAM! Understand? The more software/applications that are pushed into RAM the better because it is available to do whatever it needs to do without having to go and search for it and place into RAM! If and when you need more RAM for something new, say like opening another application...then Android will move out of RAM whatever is not being used and replace it with the new software. If your phone had 10GB of RAM it would still look nearly full. This is a GOOD thing. It's all still available for use when needed. Remember that RAM is always the fastest part of your phone. Of course the more RAM you have the more applications you can have open at any one time without any lag/stutter. But for now 3GB of RAM is quite good for a cell phone on Android.
XxKINGxX2580 said:
Is that normal? How much free RAM do you guys have?
Click to expand...
Click to collapse
Is that a built-in app showing you that?
DanRyb said:
Is that a built-in app showing you that?
Click to expand...
Click to collapse
Yes. it's called Smart Manager.
XxKINGxX2580 said:
Yes. it's called Smart Manager.
Click to expand...
Click to collapse
I just found it a few hours ago but thanks for replying LOL. This is my first Samsung that I'm using TouchWiz in years haha.
jaseman said:
Free RAM is UNUSED/WASTED RAM! Understand? The more software/applications that are pushed into RAM the better because it is available to do whatever it needs to do without having to go and search for it and place into RAM! If and when you need more RAM for something new, say like opening another application...then Android will move out of RAM whatever is not being used and replace it with the new software. If your phone had 10GB of RAM it would still look nearly full. This is a GOOD thing. It's all still available for use when needed. Remember that RAM is always the fastest part of your phone. Of course the more RAM you have the more applications you can have open at any one time without any lag/stutter. But for now 3GB of RAM is quite good for a cell phone on Android.
Click to expand...
Click to collapse
This right here, folks.
jaseman said:
Free RAM is UNUSED/WASTED RAM! Understand? The more software/applications that are pushed into RAM the better because it is available to do whatever it needs to do without having to go and search for it and place into RAM! If and when you need more RAM for something new, say like opening another application...then Android will move out of RAM whatever is not being used and replace it with the new software. If your phone had 10GB of RAM it would still look nearly full. This is a GOOD thing. It's all still available for use when needed. Remember that RAM is always the fastest part of your phone. Of course the more RAM you have the more applications you can have open at any one time without any lag/stutter. But for now 3GB of RAM is quite good for a cell phone on Android.
Click to expand...
Click to collapse
Come on... I have Galaxy S4 now (going for S6 today). The S4 comes with 1.8GB usable memory but when it reaches arount 1.5 GB it starts lagging, and by lagging I mean a lot! The fact is that when the device has less RAM it gets laggy and it works better when it has more free memory.
Anyway the higher memory usage is probably of how Lollipop works - it preloads the entire app in the RAM instead of loading it from the flash. It is meant to speed up loading but it takes more memory and I can argue for the effect.
once there are some custom roms, this "issue" will be addressed.
until then, you just have to deal with it

Categories

Resources