View Full Version : Dumb Question:What does the 4 gig patch do?
Bubblehead1980
11-28-10, 04:32 PM
Noticed in downloads there is a 4 gig patch for SH 4, what does this do exactly?
Webster
11-28-10, 10:09 PM
i think its for windows XP so it uses all 4 GB of ram instead of the 3GB limit of XP
EDIT: i was wrong . . . read post below
From the author's commentary on the program:
This very little tool patches x86 executables in order to let them have 4GB (instead of only 2) of virtual memory on x64 platforms. This tool comes very handy for applications which need a great amount of virtual memory like games, 3D renderization, multimedia etc. To gain these 2GB, you just have to use this tool to patch the executable (*.exe file) of the software you want to have these additional GBs of virtual memory. It can be used by clicking on it and choosing the file or through command line (e.g.: "4gb_patch file.exe"). It automatically creates a backup copy of the original executable.
Why things are this way on x64 is easy to explain. On x86 applications have 2GB of virtual memory out of 4GB (the other 2GB are reserved for the system). On x64 these two other GB can now be accessed by 32bit applications. In order to achieve this, a flag has to be set in the file's internal format.
This flag defines whether the file is allowed to access more than 2 GB or not, so it just comes down to a very small simple change - but one with great effect.
irish1958
11-29-10, 10:26 AM
From the author's commentary on the program:
This flag defines whether the file is allowed to access more than 2 GB or not, so it just comes down to a very small simple change - but one with great effect.
To clarify, is that for XP, 32 or 64 bit only or does it pertain to Vista/Windows7, 32 or64 bit also?
Or to state the question another was, what operating systems should use the 4Gb patch, and which do not need it (for SHIII, IV, V)?
The patch is only intended to be used on x64 Windows platforms (XP64, Vista64, Win7 64), since 32 bit operating systems usually have another default setting concerning the virtual memory allocation. As a standard, x86 based OS can only recognize and use up to 4 GB of virtual memory. Per default, 2 GB would be allocated to the kernel and 2 GB to user programs, which is absolutely fine for most purposes like office stuff, mailing and also many games etc. The downside however is that you might have some programs that would need more virtual memory than the operating system actually allows them to get. For these cases (e.g. like a heavily modded SH3), you can edit the boot.ini file and add a NT-kernel switch which forces the system to alter its distribution balance to 3 GB for user programs and only 1 GB for the system.
The boot.ini file is usually hidden unless you explicitly check the checkbox for showing hidden system files in the folder options.
You might want to have a look at this post, Fubar2Niner (http://www.subsim.com/radioroom/member.php?u=211804) was so kind to collect some examples of how to edit the boot.ini:
http://www.subsim.com/radioroom/showpost.php?p=1473354&postcount=6
However, keep in mind that the boot.ini is an important system file and should only be edited with particular caution. Some basic info on the boot.ini: http://en.wikipedia.org/wiki/NTLDR
Due to the 2 GB limitation described above, 32 bit exe-files have the flag "can use > 2 GB" unchecked in their internal file format, so that they can never use more than 2 GB. 64 bit systems however are capable of working with more than 4 GB and therefore this flag actually means that it only limits the file and cuts short possible performance increases. The patch now just changes this flag setting and allows the file to use more than just 2 GB.
So, in general, the 4GB patch should be applied if you intend to run these games in an 64 bit OS environment. For 32 bit operating systems you would have to use the 3 GB kernel switch.
ZigmundFreund
11-29-10, 12:43 PM
:woot:Very enlightening indeed! Thanks for sharing Kapitan Hess and Fubar2Niner of course!
You :rock:!
fred8615
11-29-10, 05:38 PM
Let me ask this outright since I'm still not sure. I have Win 7 64 bit. Should I use this?
Madox58
11-29-10, 05:52 PM
Especially on a 64 bit system.
Make a backup copy of the SH4.exe before you run the Patch.
Just in case.
But it only changes one byte so there should be no problems.
Jan Kyster
11-29-10, 07:31 PM
Why would we use this for SH IV?
AFAIK we don't have issues with unstable or crashing SHIV due to lack of memory? Or at all? Don't ever recall it crashing... :hmmm:
Madox58
11-29-10, 07:44 PM
If a program is limited to how much memory it can use?
It could cause stutters, slow actions of many kinds, etc.........
If it can reach more memory?
It can work better in many ways.
Some ways would save read and writes to your HDDs.
If you need it, use it.
If you have no issues?
Don't use it.
Give it a try cause you can always get rid of it.
Or you may give a report to answer all questions that will henceforth be called...........
Jan Kyster's
'After testing the 4 Gig patch thingy? Here's the low down!'
:har:
And I am not being mean or sarcastic incase you wonder.
:salute:
Let me ask this outright since I'm still not sure. I have Win 7 64 bit. Should I use this?
I also have Win 7 64 bit. You can give it a try, absolutely. The patching tool should make a backup by itself, but as privateer said, make sure you have one.
Why would we use this for SH IV?
AFAIK we don't have issues with unstable or crashing SHIV due to lack of memory? Or at all? Don't ever recall it crashing... :hmmm:
I myself only found some improvements concerning SH3, a better overall performance, almost no program crashes etc. any more. However I did never experience that much of an improvement with SH4, so I guess it really depends on the system one uses. SH4 is indeed quite stable, but with SH3 that's still a different story. There you would never go without...
Just on a side note - there are other games that may also profit from this patch. German Truck Simulator for example now rewards me with almost 15 fps more since I patched the exe. Saint's Row 2 also shows a better fps performance (about 15-20 fps more on my notebook here). I am still testing this with Battlefield 2 and several mods as well as with GTA 4. The most obvious effect you might notice is a considerable decrease in loading time.
As long as you always make a backup, testing this with other games might prove quite useful.
Sailor Steve
11-29-10, 08:02 PM
Some time ago I went out and bought another two GB of memory. Now I find out I wasted my money, as my system is 32 bit.
Oh well.
Madox58
11-29-10, 08:06 PM
The patch I posted here is only for SH4 version 1.5
That was done to avoid problems with the Programmer of the Universal Patcher and permissions.
And was also done in a way that works well for SubSim.
Since the Patch here is only for SH4 version 1.5?
(And the SH3 versions)
The downloads are targeted.
Jan Kyster
11-29-10, 09:08 PM
Right, done some testing now.
Before each test, these steps were followed:
- boot system
- wait 3 mins for W7 to settle :D
- load Process Monitor
- run the SH4.exe (made two: SH4-ORG.exe and SH4-LAA.exe)
- start process monitor
- play a bit
- exit SH4
- read Process Monitor
Test 1, standard TMO career, approaching harbour for attack, 9 ships in play.
Test 2, run single mission "Tokio-Saipan Convoy", 23 ships in play.
Screenshots of Process Monitor.
Test 1, org. and patched:
http://i189.photobucket.com/albums/z15/subject_rod/SH4-LAA/SH4-ORG-T1.jpg
http://i189.photobucket.com/albums/z15/subject_rod/SH4-LAA/SH4-LAA-T1.jpg
Test 2, org. and patched:
http://i189.photobucket.com/albums/z15/subject_rod/SH4-LAA/SH4-ORG-T2.jpg
http://i189.photobucket.com/albums/z15/subject_rod/SH4-LAA/SH4-LAA-T2.jpg
For Process Monitor and (another) LAA-program: http://forums.techpowerup.com/showthread.php?t=112556
I notice, the CPU barely breakes any sweat... http://i189.photobucket.com/albums/z15/subject_rod/smilies/biggrin3.gif
Conclusion:
I found no difference, but at least it didn't crash SH4. Seems to run unaffected.
Would like to test, if someone has a mission with a humongeous load of ships... :shifty:
"Hey! It's only a drill!"
http://i189.photobucket.com/albums/z15/subject_rod/SH4-LAA/LAA-Test.jpg
.
Jan Kyster
11-30-10, 08:49 PM
Thought of making a really heavy mission with quadzillions of ships, but then it struck me! The OM Museum!
Always known as a "Not To Be Used!" option because of crash!
So loaded OM with all stuff and quite right - SH4 crashed.
Here's the Process Monitor screendump.
Note how the max. memory use do not exceed 1.65 GB! but it still crashes...
http://i189.photobucket.com/albums/z15/subject_rod/SH4-LAA/OM-SH4org-MUSEUM.jpg
Now the LAA patched SH4 Process Monitor screendump:
http://i189.photobucket.com/albums/z15/subject_rod/SH4-LAA/OM-SH4laa-MUSEUM.jpg
Conclusion:
Reason for SH4 crashing in Museum, is because of the 2GB limitation. Using the LAA patch now allows for opening the museum.
Max. memory 2.21 GB for OM! :rock:
However, the sea is very strange.
Like high speed water flow... but of course, noone has ever seen it before... :D
Been running with the LAA patch for some 10 hours and have found no side effects, so I would say it's safe to use.
And if you would like to see the Museum, it's a must have!
/edit, note re. memory use.
Extra memory used for 9 to 23 ships = 1.40GB to 1.48 = 80MB
With Max memory = 1.65GB = crash, then we have 1.64GB-1.48GB = 160MB in real overhead.
Which is only twice of what required to meet 22 ships in the open ocean. No harbour, shallows, land etc.
All my installs now have the LAA patch. Imho it's a must have. Thanks for the hint, BubbleHead! :salute:
Core i7-930, 6GB, Win7 64-bit used in test.
Btw. Bubble, you should change the thread title to "[Solved] What does the 4 gig Patch do?"
It does nothing but good! http://i189.photobucket.com/albums/z15/subject_rod/smilies/biggrin.gif
irish1958
12-01-10, 09:31 AM
Jan Kyster
Thanks for the info;
This is an example of how good science works
State a problem, form a premise, gather data to support or refute the premise, form a conclusion supported by the gathered data,
Publish the results and invite comment.
I tested the premise and can confirm that the museum is viewable with the 4Gb patch installed on Win7, 64 bits.
Madox58
12-01-10, 10:15 AM
@Jan Kyster,
Great report!
I knew you would give us the needed facts in a
concise way.
:rock:
I run SHIV 1.5 modded to TMO2 on XP Pro on x86 processor. I have 4GB memory. I tried to install patch by executing it and got error message saying it can't install 'cause it couldn't verify version of SH.exe. Huh? I installed it in C:\SHIV, not C:\Program Files\etc..etc. What am I doing wrong?
Madox58
12-02-10, 06:38 PM
Did you browse to your install folder or just click and hope it would find it?
I browsed to C:\SHIV 1,5 which is the folder that I installed into. There is an SH.exe in that folder. I tried three other folders which also have modded versions of SHIV and got the same error, something about can't verify the version of SH.exe.
Madox58
12-02-10, 07:30 PM
OK.
It was my fault.
I pointed to the 1.2 version by mistake.
Don't know why I have that .exe hanging around.
:nope:
I'll rebuild and update the patch.
Thanks for catching this.
:yeah:
Madox58
12-02-10, 07:41 PM
Here's the fix.
http://www.mediafire.com/?tup80dnapf8uiug
SubSim version updated now also.
:up:
Ok I'll try it tonight. What do you think I can expect from installing
this fix?
MaddogK
12-03-10, 12:15 PM
I'd like to know if anyone has tested this fix with a manually defined swap file size instead of the windows default setting of 'system managed size'.
As an old gamer trick to stabilize some flaky games is to 'fix' the virtual memory size at 1.5 times the size of physical memory I'm wondering if this fix will help anyone with a fixed virtual memory size less than 4GB (or 3GB on 32 bit XP pro).
Here's the fix.
http://www.mediafire.com/?tup80dnapf8uiug
SubSim version updated now also.
:up:
I Dl'd from SubSim because my aV software detected a threat at mediafire.
Troed to install with the new .exe, and it got past the version problem but presented another message that "a file was write protected, did I want to overwrite". Was not sure waht file was protected, (SH4.exe?) and did not know how to answer so I cancelled. Please advise.
Madox58
12-03-10, 05:20 PM
It's OK to overwrite it.
You can always make a copy of the SH4.exe before you patch it also.
SH4.exe is marked as read only for whatever reason.
(Not like anything writes to that file and a Virus/Trojan would do it anyway without you knowing)
This patch at SubSim does not look at or touch any other files!
You might see no difference with the Game.
But it's been proven that it can now access more memory.
And that would mean less chances of any crashes do to memory limits.
Op Munson Museum was the bench mark.
No patch = crash!
Patch = Museum works!
drakkhen20
12-11-10, 12:11 AM
ive got windows 7 x64 bit and had no problems with patch. was wondering what it did exactly.good explainations in these post. I have noticed shorter loading times on my system when patch was applied. but everyone has a diffrent setup. this patch can be applied to other exe files as stated but moat of the time you dont see much of a diffrence. also if you run your screen reses above 1024 it helps to take the load off your cpu if you have a decent video card or 2 3 way sli or crossfire. as stated in seeing diffrence I have installed patch on games like oblivion and not noticed diffrence but the game it self might not need to exceed or use 1g of ram. sh4 does seem a rather stable game in stock trim until modded heavely. so this patch is a good thing. good testing by the way. I had no problems with sh3 either but patched it anyway. also helps on driving games as well such as nfs where your system is taxed trying to load up coming scenery, but alot has to deal with what kind of system you have put together or baught.
Just on a side note - there are other games that may also profit from this patch.
I'd like to try it on other games but the patch looks for sh4.exe specifically, how do you get around that?
Madox58
12-11-10, 03:18 PM
I'd like to try it on other games but the patch looks for sh4.exe specifically, how do you get around that?
The patch hosted here is only for SH4 version 1.5
I did it that way to avoid problems with the Creator of the original
version that will patch nearly every program.
If you want the Multi-program that patches all kinds of stuff?
I can send you a link by PM.
:salute:
The patch hosted here is only for SH4 version 1.5
I did it that way to avoid problems with the Creator of the original
version that will patch nearly every program.
If you want the Multi-program that patches all kinds of stuff?
I can send you a link by PM.
:salute:
Ah, thank you, I didn't understand there was a second version. Thank you for the link, I have downloaded it :)
I'm goin' down
12-17-10, 01:04 AM
I have a 2002 xp professional 32 bit. The game freezes temporarily and is slow to load and exit. Will a patch help? If so, point the way please.
Jan Kyster
12-17-10, 05:35 AM
Have a look here http://forums.techpowerup.com/showthread.php?t=112556
And check post #14 and #15 in this thread... :D
But I doubt it will help you against the freeze... that sounds more like a hardware problem to me.
Unless you mean it only freezes for some seconds and then continues?
On the other hand there are no negative sideeffects when using the LAA-fix, so it wouldn't harm anything trying it.
How much RAM do you have?
I'm goin' down
12-17-10, 12:37 PM
How much RAM do you have?
223 GB ( I think I looked in the right place.)
I'm goin' down
12-17-10, 03:33 PM
I downloaded it to the SH4 main folder and ran it. I think I did it correctly. Let me know if I made a mistake.
223 GB ( I think I looked in the right place.)
The 223GB is probably the size of your hard drive not the amount of RAM you have. If you right click on "My Computer", on your desk top, and go down to properties. The box that comes up will show you how much RAM, random access memory, you have installed on your computer.
iLikeGry
03-26-11, 09:52 PM
Hi. I've just tried running it on Steam version of SH4 (with the U-boat add-on installed) but got "unknown version" error. Any suggestions?
Windows 7 Pro 64-bit.
Thanks.
Jan Kyster
03-27-11, 12:52 AM
Use link for patcher in post #32 instead...
Mikemike47
03-27-11, 05:11 PM
Hi. I've just tried running it on Steam version of SH4 (with the U-boat add-on installed) but got "unknown version" error. Any suggestions?
Windows 7 Pro 64-bit.
Thanks.
I realize you are talking about SH4.exe, but here is a steam related problem to SH5.exe which may be why executables are a problem to change coming from Steam.
Excerpt from:
http://www.subsim.com/radioroom/showthread.php?t=181433, post #1
"For Steam versions of the SH5.exe:
Unable to provide solution to Steam users. The steam sh5.exe uses a form of self-modifying code copy protection that 'unpacks' the code when the executable is run. This form isn't impossible to read and decipher it just takes longer and quite frankly the reward to time relationship isn't worth it for me (not to mention that I can't run the .exe since I don't own the steam version of the game - I own the boxed version of the game). Sorry all. This is one reason why I never buy Steam based games unless I have to."
I remember when this was first posted, but never really gave it any thought. That was until the other day. Strangely enough, since installing SH4 on my new Windows7 64 system I have been haveing some problems with occasional crashes. In campaign, I always crashed when nearing my home base during TC. I would then reload, lower the TC, and I would be able to complete the mission. Then the other day out of the blue, I decided to play a couple of the single missions. Now just to be clear, I had played a couple of the single missions, but not ones that had TF engagements.
Before I go any further let me say that I'm running several mods including RFB, and RSRD. OK, back to the point. I chose to play the last mission listed. USS Spadefish needs to engage a convoy including a carrier. I would make radar contact, make my approach, and then as I neared for the attack, CRASH!! This happened several times. OK I thought, mabey a FUBAR mission file. Let's try the USS Albacore mission. A large TF of CVs and BBs. The same results. This got me thinking. After playing several of the single missions with lesser numbers of ships, the common denominator of the crashing missions was large numbers of ships. In the case of the Spadefish mission, about 15 ships.
I then began to search these forums for possible answers, and there it was. After reading this thread it started to make sense. My campaigns were always to this point involving single merchants or small 3-4 ship convoys. My problem was the return to a busy harbor at TC. I never realized until the other day, that a problem existed. Anyway, I installed this patch, and successfully played the two problem missions without crashes. The only crashes were the depth charges above my head! I still find it strange that I would have these issues on a system with 6gigs of RAM, but so far, this patch has seemed to do the trick.
fitzcarraldo
04-20-11, 11:51 AM
Thought of making a really heavy mission with quadzillions of ships, but then it struck me! The OM Museum!
Always known as a "Not To Be Used!" option because of crash!
So loaded OM with all stuff and quite right - SH4 crashed.
Here's the Process Monitor screendump.
Note how the max. memory use do not exceed 1.65 GB! but it still crashes...
http://i189.photobucket.com/albums/z15/subject_rod/SH4-LAA/OM-SH4org-MUSEUM.jpg
Now the LAA patched SH4 Process Monitor screendump:
http://i189.photobucket.com/albums/z15/subject_rod/SH4-LAA/OM-SH4laa-MUSEUM.jpg
Conclusion:
Reason for SH4 crashing in Museum, is because of the 2GB limitation. Using the LAA patch now allows for opening the museum.
Max. memory 2.21 GB for OM! :rock:
However, the sea is very strange.
Like high speed water flow... but of course, noone has ever seen it before... :D
Been running with the LAA patch for some 10 hours and have found no side effects, so I would say it's safe to use.
And if you would like to see the Museum, it's a must have!
/edit, note re. memory use.
Extra memory used for 9 to 23 ships = 1.40GB to 1.48 = 80MB
With Max memory = 1.65GB = crash, then we have 1.64GB-1.48GB = 160MB in real overhead.
Which is only twice of what required to meet 22 ships in the open ocean. No harbour, shallows, land etc.
All my installs now have the LAA patch. Imho it's a must have. Thanks for the hint, BubbleHead! :salute:
Core i7-930, 6GB, Win7 64-bit used in test.
Btw. Bubble, you should change the thread title to "[Solved] What does the 4 gig Patch do?"
It does nothing but good! http://i189.photobucket.com/albums/z15/subject_rod/smilies/biggrin.gif
LAA patch is the same 4GbPatch? I have this in SH4; TMO with RSRDC OK, but OM, without museum. Glup! :hmmm:
Regards.
Fitzcarraldo :salute:
Jan Kyster
04-20-11, 02:35 PM
LAA patch is the same 4GbPatch?No, it's not. But the end result should be the same. Setting the Large Address Awareness-bit.
However I prefer the "original" work since this have some more features and may handle all kinds of programs... follow links in above posts.
OM Museum - Glup?? :rotfl2:
Can open it at any time. It do take some time due to the massive amount of ships and planes, but eventually it gets there...
Impossible to open without allowing SH4 to use more RAM than it's native 2GB (=1.6GB) address limit permits... as screendumps above shows.
There is a utility hosted here, just for the SH4exe. I also installed the LAA, and have used it for Il21946 with UP2.01, and BOBWOV with the 2.11 update and multiskin. It seems to have cured some random CTD's in both of them as well.
Charlie901
03-01-12, 09:33 PM
Tried to install this Patch to the SH4.exe and keep getting an Error that it can't patch due to the SH4.exe being an "Unknown" version...???
I have version 1.5 and am pointing the patch to the C:\Ubisoft\Silent Hunter 4... folder.
What could be the problem???
Jan Kyster
03-01-12, 11:44 PM
Use this generic patcher instead... http://www.techpowerup.com/forums/showthread.php?t=112556
do i need this patch if i have more of 4 GB of memory?
i have 8 GB RAM Win7/64 and don't wanna stress my system if isn't really necessary, thanks in advance :salute:
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.