Jump to content


MEMORY ISSUE... Not solved but a hope at the end of the tunnel !

- - - - -

47 replies to this topic

#1
rodrigofd

rodrigofd

    Diehard

  • MoDaCo Ad Free
  • PipPipPipPip
  • 408 posts
  • Location:Buenos Aires, Argentina
  • Devices:Omnia 2 I8000; HTC Fuze
Okay guys, most of you , if you are hanging around here for a while , you probably are aware of the various 'memory issues' that our I8000 suffer from.. among others, memory leaks, auto closing apps, etc.

But probably the most crucial one is the 'half-memory' reservation, done by Samsung, where it locks and reserves 50% of physical memory (RAM) which is left unavailable for general WM usage. So far, we didn't achieve anything regarding this subject.

What i CAN tell you, is that it is not in the EBOOT, it is hard-coded in the main device kernel (nk.exe) inside kernel partition.

Now for the 'hope' part: one of greatest WinMobile and XDA gurus of all time, CMONEX, has answered my prayers in this matter. She said that reservation is probably reserved and USED by drivers or radio part, and such usage might be reduced if some of it is wasted allocation.

She can do such work, but she's unavilable following weeks, maybe a couple months later she replied, might be able to help us :) ...

Cooking ROMs for I8000 & I8000L

Want to support my work?? :)

Posted Image / EUR: Posted Image

#2
ku_dq007

ku_dq007

    Newbie

  • Members
  • Pip
  • 17 posts
  • Devices:I8000
It's a good news, just waiting.


#3
hangman11

hangman11

    Newbie

  • Members
  • Pip
  • 40 posts
  • Gender:Male
  • Location:Singapore
nice, couples of months, better then nothing at all :) *so excited*


#4
iWiNMo

iWiNMo

    Enthusiast

  • Members
  • PipPipPip
  • 240 posts
  • Devices:Omnia II + ....
We gonna need that damn half RAM right before WinMobile7 release, late next year! Then we will be able to flash our toys to WinMo7 exactly when HD2 is going to get it first due to its pre-qualification!


Thanks for the news :)


#5
FerdiBorbon

FerdiBorbon

    Addict

  • Members
  • PipPipPipPipPip
  • 597 posts
  • Location:Australia Sydney
  • Devices:Nexus S
rodrigofd thank you for the kind update, at least this will put peoples mind at ease trying to figure out where the reserved ram was coming from.
Just enjoy your Christmas and New Years people :)


#6
gcrasy

gcrasy

    Newbie

  • Members
  • Pip
  • 9 posts

View Postrodrigofd, on Dec 23 2009, 22:14, said:

Okay guys, most of you , if you are hanging around here for a while , you probably are aware of the various 'memory issues' that our I8000 suffer from.. among others, memory leaks, auto closing apps, etc.

But probably the most crucial one is the 'half-memory' reservation, done by Samsung, where it locks and reserves 50% of physical memory (RAM) which is left unavailable for general WM usage. So far, we didn't achieve anything regarding this subject.

What i CAN tell you, is that it is not in the EBOOT, it is hard-coded in the main device kernel (nk.exe) inside kernel partition.

Now for the 'hope' part: one of greatest WinMobile and XDA gurus of all time, CMONEX, has answered my prayers in this matter. She said that reservation is probably reserved and USED by drivers or radio part, and such usage might be reduced if some of it is wasted allocation.

She can do such work, but she's unavilable following weeks, maybe a couple months later she replied, might be able to help us :) ...

As I know that when we port WM6.5.3 we use the latest nk.exe from other devices. It means that all XIP ROM has the MS nk.exe but not Samsung version.
But the same issue in WM6.5.3. I'm not sure where the reserved memery hided now but it not like from nk.exe

Whatever, it's good news for all I8000 user.
Thank you for your information!

Edited by gcrasy, 24 December 2009 - 05:24 PM.


#7
Khisha

Khisha

    Regular

  • Members
  • PipPip
  • 98 posts
  • Devices:GT-I8000

View Postgcrasy, on Dec 24 2009, 19:16, said:

As I know that when we port WM6.5.3 we use the latest nk.exe from other devices. It means that all XIP ROM has the MS nk.exe but not Samsung version.
But the same issue in WM6.5.3. I'm not sure where the reserved memery hided now but it not like from nk.exe
I totally agree.


#8
rodrigofd

rodrigofd

    Diehard

  • MoDaCo Ad Free
  • PipPipPipPip
  • 408 posts
  • Location:Buenos Aires, Argentina
  • Devices:Omnia 2 I8000; HTC Fuze

View PostKhisha, on Dec 24 2009, 16:37, said:

I totally agree.


Sorry, but your info is totally incorrect!!! NK.EXE is precisely the most 'device-dependent' pieces of WM !! When you port the WM version, you keep the original NK.EXE, which is written exclusively by Samsung.

WM version porting has NOTHING to do with the kernel issue, and nk.exe among other things, is responsible for low-level memory handling, specially if reserved memory should be allocated for drivers, etc.

Cooking ROMs for I8000 & I8000L

Want to support my work?? :)

Posted Image / EUR: Posted Image

#9
Michael Pang

Michael Pang

    Enthusiast

  • Members
  • PipPipPip
  • 245 posts

View Postrodrigofd, on Dec 25 2009, 03:46, said:

Sorry, but your info is totally incorrect!!! NK.EXE is precisely the most 'device-dependent' pieces of WM !! When you port the WM version, you keep the original NK.EXE, which is written exclusively by Samsung.

WM version porting has NOTHING to do with the kernel issue, and nk.exe among other things, is responsible for low-level memory handling, specially if reserved memory should be allocated for drivers, etc.


i have a question, even we find that nk.exe is controlling the amount of reserved memory, there is still another issue, which is memory leak (may be samsung apps or drivers issue). To be honest, after 3 days of use using L5 rom, i only have less than 30M free memory which is even less than my old i900 and i8000 on wm6.1.

Edited by Michael Pang, 25 December 2009 - 04:31 AM.


#10
touchflo

touchflo

    Newbie

  • Members
  • Pip
  • 25 posts
actually the problem is in eboot

and i dont have a memory leak. i disabled the windows lock screen(and samsung) because everytime id lock it, it would eat up a few MB ram. after i disable it im steady even after 5 days i still get close to 60MB.


#11
Michael Pang

Michael Pang

    Enthusiast

  • Members
  • PipPipPip
  • 245 posts

View Posttouchflo, on Dec 25 2009, 12:14, said:

actually the problem is in eboot

and i dont have a memory leak. i disabled the windows lock screen(and samsung) because everytime id lock it, it would eat up a few MB ram. after i disable it im steady even after 5 days i still get close to 60MB.


did you use Opera or IE Mobile in the 5 days you mentioned?


#12
nap_rz

nap_rz

    Enthusiast

  • Members
  • PipPipPip
  • 260 posts
lock screen doesn't cause memory leak for me, IE does...


#13
touchflo

touchflo

    Newbie

  • Members
  • Pip
  • 25 posts

View PostMichael Pang, on Dec 25 2009, 04:32, said:

did you use Opera or IE Mobile in the 5 days you mentioned?


neither .i use opera mini for browsing.nice and fast. i only use ie for online banking.ive used emulators,played videos,opened docs,browsed,messaged,google maps,music,etc...


#14
wes58

wes58

    Diehard

  • Members
  • PipPipPipPip
  • 442 posts
  • Devices:I900
Here are some thoughts and info found in regards to free RAM (I hope that at least partially it is correct).

Definition of ROMHDR (in XIP) according to Microsoft contains the following values (I only listed a few values plus data from our rom):
physfirst - First physical address. - 80300000h
physlast - Highest physical address. - 8074105Ch
ulRAMStart - Start of RAM.    - 80742000h
ulRAMFree - Start of RAM free space. - 80925000h
ulRAMEnd - End of RAM. - 88000000h

The actual physical XIP RAM address starts at physfirst address, and ends at ulRAMEnd. The XIP should end at or before physlast addres. So, size of XIP that it has to fit into, is equal to (physlast - physfirst).
After physlast comes ulRAMStart, that's where RAM required for nk.exe is located, which ends at ulRAMFree. Free memory that is available for OS is between ulRAMFree and ulRAMEnd (in our rom = 88000000h - 80925000h). That's what we are left with for program memory. Shrinking XIP and relocating nk.exe will allow to recover some of the wasted space and give some program memory (but you can't move a module out of XIP if it is required by the system).

Another test I did was to delete some modules from XIP, but this only gave me a little bit of RAM, so the only way is to go in the other direction.

So the other limiting end is ulRAMEnd (88000000h). What is beyond this value? Can this value be increased?

Edit:
I did a test. I changed End of Ram address from 88000000 to 88020000 (in Romhdr.bin in XIP and imageinfo.bin in .VM) but unfortunately it didn't work. The phone got to WM (orange) splash screen, and after one beep it didn't get to calibration screen. I think that the address may be also coded in nk.exe, or maybe there is something else that I don't know about. Another test I might try to do tomorros is to reduce End of Ram and see if the phone boots.

Edited by wes58, 25 December 2009 - 01:22 PM.

If you find this Application useful, you can buy me a glass of wine




Posted Image


Samsung Omnia II GT-I8000

#15
nap_rz

nap_rz

    Enthusiast

  • Members
  • PipPipPip
  • 260 posts

View Posttouchflo, on Dec 25 2009, 13:47, said:

neither .i use opera mini for browsing.nice and fast. i only use ie for online banking.ive used emulators,played videos,opened docs,browsed,messaged,google maps,music,etc...

did you multitask a lot? how did you manage to ged rid of the annoying auto closing apps by the phone itself?


#16
CF Chong

CF Chong

    Old Newbie

  • Members
  • PipPip
  • 68 posts
  • Devices:HTC Desire
Found something in the registry...did some googling but did not find any info on this...any sifu got any advice?

Attached File  MmMemory.PNG   76.03K   42 downloads


#17
wes58

wes58

    Diehard

  • Members
  • PipPipPipPip
  • 442 posts
  • Devices:I900

View PostCF Chong, on Dec 25 2009, 12:26, said:

Found something in the registry...did some googling but did not find any info on this...any sifu got any advice?

Attachment MmMemory.PNG

This won't be a registy setting. It has to be hard coded in the Rom. I am pretty sure that what I wrote before is correct. The question is if we can change the address of the end of ram. And could it cause if we managed to do it?

If you find this Application useful, you can buy me a glass of wine




Posted Image


Samsung Omnia II GT-I8000

#18
nap_rz

nap_rz

    Enthusiast

  • Members
  • PipPipPip
  • 260 posts

View Postwes58, on Dec 25 2009, 18:16, said:

Here are some thoughts and info found in regards to free RAM (I hope that at least partially it is correct).

Definition of ROMHDR (in XIP) according to Microsoft contains the following values (I only listed a few values plus data from our rom):
physfirst - First physical address. - 80300000h
physlast - Highest physical address. - 8074105Ch
ulRAMStart - Start of RAM.    - 80742000h
ulRAMFree - Start of RAM free space. - 80925000h
ulRAMEnd - End of RAM. - 88000000h

The actual physical XIP RAM address starts at physfirst address, and ends at ulRAMEnd. The XIP should end at or before physlast addres. So, size of XIP that it has to fit into, is equal to (physlast - physfirst).
After physlast comes ulRAMStart, that's where RAM required for nk.exe is located, which ends at ulRAMFree. Free memory that is available for OS is between ulRAMFree and ulRAMEnd (in our rom = 88000000h - 80925000h). That's what we are left with for program memory. Shrinking XIP and relocating nk.exe will allow to recover some of the wasted space and give some program memory (but you can't move a module out of XIP if it is required by the system).

So the other limiting end is ulRAMEnd (88000000h). What is beyond this value? Can this value be increased?

hmm converting that into decimals give us nothing like 140000000...

edit : nope, just realize they're memory address numbers not size count...

Edited by nap_rz, 25 December 2009 - 01:47 PM.


#19
touchflo

touchflo

    Newbie

  • Members
  • Pip
  • 25 posts

View Postnap_rz, on Dec 25 2009, 11:17, said:

did you multitask a lot? how did you manage to ged rid of the annoying auto closing apps by the phone itself?

i never got to really low ram for my apps to start closing. i multitask all the time. opera mini+music player or fm radio + messenger + aim + smsing + pdf or word docs .


#20
nap_rz

nap_rz

    Enthusiast

  • Members
  • PipPipPip
  • 260 posts

View Posttouchflo, on Dec 26 2009, 03:25, said:

i never got to really low ram for my apps to start closing. i multitask all the time. opera mini+music player or fm radio + messenger + aim + smsing + pdf or word docs .

well....no offense, but I find it hard to believe you when most of us suffering about this B)  :)  ;) , okay for me it's not that bad now with mr. Kuanchai's ROM, not as bad as the original ROM, but sometime ago I tried opening message, opera mobile 10b2, core player, samsung photo album, contacts, and resco explorer, the RAM I approximately went down to 30, however when I opened windows' task manager 5 of them closed by the phone B) .

hm....sorry for derailing the thread, but I think and I fear even if we had 100MB of RAM this could still happen :o





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users