ZArchive Manages Your File Archives

Today smartphones are quite powerful devices that can handle multiple processes at once. In fact, some of … more

Regain Double Tap to Wake Functionality on the Nexus 6

A few months ago, Google announced its newest flagship device, the Nexus 6, alongside … more

Clean Your Recent Apps – XDA Xposed Tuesday

In this day and age, you have quite a few apps installed and running on your Android … more

Android Studio Reaches Release Candidate Status

Android app developers have a few options when comes to Android IDEs. One of the most … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

21MB RAM Hack "KANGMEM" updated 5/4! [Source] [zImage]

OP coolbho3000

3rd May 2010, 10:09 PM   |  #1  
OP Senior Recognized Developer
Thanks Meter: 764
 
886 posts
Join Date:Joined: Dec 2008
More
This time, my RAM hack expands memory by 21MB total from the stock kernel. And this time, no camera PMEM is taken away! This is all thanks to the incrediblec kernel source released by HTC giving me some insight.

This is what I did, starting from the 8MB RAM hack:
- Expanded EBI1_BANK0 by 8MB because the incrediblec source said I could
- Moved 5MB GPU memory from EBI1_BANK0 to SMI
- Created extra memory bank in EBI1_BANK0 totalling 13MB
- Added 8MB camera PMEM back into SMI, and re-enabled camera PMEM

Version 2:
- Eliminated third memory bank in EBI1_BANK0 and added that memory into the first memory bank

As far as I know it's not possible to create a memory bank in the SMI and live to tell the tale, so that's why we're squeezing the 8MB of camera PMEM in there. In total, this adds 21MB of RAM from stock cm-kernel with seemingly no compromises.

The zImage is meant to be a proof of concept and only contains this tweak on top of normal cm-kernel. I don't suggest using this zImage for long, as it doesn't contain any "extras," and the regular custom kernels with all the extra features/optimizations will probably incorporate this soon.

Enjoy!

Version 2
Source: http://dl.dropbox.com/u/36553/board-...angmem2.tar.gz
Test zImage: http://dl.dropbox.com/u/36553/zImage-kangmem2

Old version
Source: http://dl.dropbox.com/u/36553/board-mahimahi.tar.gz
Test zImage (requires 2.6.33.3 wifi modules for wifi to work!): http://dl.dropbox.com/u/36553/zImage-kangmem

Quote:

cat /proc/meminfo
MemTotal: 416632 kB
MemFree: 39932 kB
Buffers: 7988 kB
Cached: 111812 kB
SwapCached: 0 kB
Active: 253484 kB
Inactive: 82412 kB
Active(anon): 220128 kB
Inactive(anon): 0 kB
Active(file): 33356 kB
Inactive(file): 82412 kB
Unevictable: 0 kB
Mlocked: 0 kB
HighTotal: 293888 kB
HighFree: 1200 kB
LowTotal: 122744 kB
LowFree: 38732 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 216104 kB
Mapped: 81076 kB
Shmem: 4032 kB
Slab: 10188 kB
SReclaimable: 4024 kB
SUnreclaim: 6164 kB
KernelStack: 3496 kB
PageTables: 11220 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 208316 kB
Committed_AS: 5665668 kB
VmallocTotal: 778240 kB
VmallocUsed: 144392 kB
VmallocChunk: 592044 kB

Last edited by coolbho3000; 6th May 2010 at 03:10 AM.
3rd May 2010, 10:21 PM   |  #2  
Recognized Developer
Thanks Meter: 718
 
853 posts
Join Date:Joined: Jan 2007
Nice job coolbho. Why don't you recommend using it for long?
3rd May 2010, 10:24 PM   |  #3  
OP Senior Recognized Developer
Thanks Meter: 764
 
886 posts
Join Date:Joined: Dec 2008
More
Quote:
Originally Posted by persiansown

Nice job coolbho. Why don't you recommend using it for long?

The zimage I built has no optimizations or any changes at all. The patch itself seems to be stable afaik.
Last edited by coolbho3000; 3rd May 2010 at 10:28 PM.
3rd May 2010, 10:28 PM   |  #4  
jlevy73's Avatar
Senior Member
Los Angeles
Thanks Meter: 1,307
 
9,267 posts
Join Date:Joined: Nov 2009
Quote:
Originally Posted by coolbho3000

The zimage I built has no optimizations or any changes at all. The patch seems to be stable afaik.

Nice indeed, thanks. How long have you been running this kernel for? Even without the optimizations it should say stable, shouldn't it?

I wonder what the consequences will be by removing the 5mb from the GPU.
3rd May 2010, 10:34 PM   |  #5  
OP Senior Recognized Developer
Thanks Meter: 764
 
886 posts
Join Date:Joined: Dec 2008
More
Quote:
Originally Posted by jlevy73

Nice indeed, thanks. How long have you been running this kernel for? Even without the optimizations it should say stable, shouldn't it?

I wonder what the consequences will be by removing the 5mb from the GPU.

I've tested it for a few hours, and it seems to be fine. The 5MB was moved, not removed. Instead of removing that 8MB of camera PMEM as the last tweak did, I moved it. There are no RAM banks that are unaccounted for in this patch.
3rd May 2010, 10:36 PM   |  #6  
jlevy73's Avatar
Senior Member
Los Angeles
Thanks Meter: 1,307
 
9,267 posts
Join Date:Joined: Nov 2009
Quote:
Originally Posted by coolbho3000

I've tested it for a few hours, and it seems to be fine. The 5MB was moved, not removed. Instead of removing that 8MB of camera PMEM as the last tweak did, I moved it. There are no RAM banks that are unaccounted for in this patch.

Is this the .33.2 kernel or .33.3?
3rd May 2010, 10:39 PM   |  #7  
OP Senior Recognized Developer
Thanks Meter: 764
 
886 posts
Join Date:Joined: Dec 2008
More
Quote:
Originally Posted by jlevy73

Is this the .33.2 kernel or .33.3?

It's the 33.3 kernel, but the patch can probably be applied to any kernel from 32. But please bear in mind that the zimage I posted here is not really for general consumption. It works, but it doesn't have any of the extras.
3rd May 2010, 10:45 PM   |  #8  
Recognized Developer
Thanks Meter: 3,873
 
7,739 posts
Join Date:Joined: Dec 2008
good stuff dude.

i will patch this in and commit to git later tonight and run some tests.

3rd May 2010, 10:52 PM   |  #9  
Recognized Developer
Thanks Meter: 1,013
 
1,965 posts
Join Date:Joined: Mar 2010
Donate to Me
More
Interesting. I'll integrate this later when I get to the office.
3rd May 2010, 11:32 PM   |  #10  
jlevy73's Avatar
Senior Member
Los Angeles
Thanks Meter: 1,307
 
9,267 posts
Join Date:Joined: Nov 2009
In the name of XDA science, I installed and so far so good. It's pretty fast, seems a little faster than stock .33.3 but that could just be placebo. The 21mb is definitely real. I will continue to play with it. If I run into any issue I will post logs.

Thanks again.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes