WARNING: I am not responsible, nor EA nor anybody but you, if, by trying to follow the procedures in this fix, you affect the integrity of your PC so badly your gaming performance is diminished or worse, you lose your ability to use your PC at all. Those that are not used to this should consider doing this fix with caution.
EDIT: The problem has been confirmed by the developers to be a memory leak. They are trying to find the source of this leak, but it is very hard to find the root of this problem. If they are lucky, they might find the faulty line of code quickly enough and send a new game update that will fix the problem. Thus, the procedures in this fix are only temporary, for those who don't want to wait to play without crashes.
EDIT: After reports of many players, it has been confirmed that this fix will work aswell for Windows 7 users as for Vista 32-bits/Vista 64-bits users.
EDIT: Before you read on, be aware that turning down the video quality settings to MEDIUM or lower could help you delay or even get rid of those crashes. Apply this fix only if you absolutely want to play on high definition quality.
IMPORTANT NOTICE: This fix is not for everyone, as increasing too much the "single program memory usage limit" will make the BFP4f.exe hog all memory ressources and could cause all your computer to "hardware lag", which is noticable when all the PC actions are slowered, even on the Windows desktop. Right now, it would be entirely safe to stick with the numbers in this step-by-step guide if your PC has around 4 Gb of RAM (physical memory). Although this always depends on all the other applications one's PC is running in background.
Like many of us on the forums, I experienced too the infamous MemoryDLL.dll crash, caused by memory building up as you play and causing you to crash after you spent a somewhat determined amount of time in game, no matter what happens or how you play. Also, for some reason, this problem used to occur more often when I was playing on Oman map, and also in between game starts and ends.
After some search on the forums here and on the internet, I finally managed to find a fix and I discovered that this problem is carried since the early Battlefield games! Why? This game is built over a heavily tweaked BF2 engine (watch the interviews of Ben Cousins at the presentation of BFP4F for EA games held in London, in early November 2010 for more info).
First, here's my system specifications (because it's not everyone who are having this problem and you might see some similarities between your system and mine, which are the cause of the crash):
My System Specifications:
CPU: Intel® Core™2 Duo CPU T8100 @2,10GHz
GC: Nvidia GeForce 9500 GS (512 MB memory)
RAM: 3 GB
Operating System: Windows Vista 32-bits
Internet Browser: Firefox 3.6.12
It seems the problem is caused by Windows Vista 32-bits. In its default configuration, it prohibits any application to use more than 2 GB of virtual memory at any given time. It happens BFP4f.exe sometimes asks usage for more than this amount when you play on High Quality video settings. Lowering the video definition is a possible solution to get rid of the crashes (althought it has been reported the crashes can still occur on medium definition)
The crash will most of the time appear as a popup saying "memory.dll: all alloc attempts failed for size (number) ", then showing a Windows crash event, with the details of the crash, and with the faulty module to be identified as MemoryDLL.dll .
The fix to this problem will require you to download Microsoft Visual C++ 2008 Express Edition (its this version of Visual C++ I've used to solve my problem). You may find many trustworthy sites that alow you to dowload it for free, like Microsoft download center.
I found the procedures of this fix on this site:
Steps to follow:
1. Install the Microsoft Visual C++ 2008 Express Edition you've downloaded.
EDIT: Here's a link given by Sgt.tmH: http://www.microsoft.com/downloads/en/de...laylang=en
There are many versions of MSVE 2008 (with or without SP updates). Also, newer versions would also work, but could require you to install service packs if you're running on Vista. I recommand MSVE 2008 because that's the version I used.
Note: My visual studio express 2008 didn't have the command prompt so i just installed Visual c++ 2012 express.
2. Run as administrator the Visual Studio 2008 Command Prompt in the Microsoft Visual C++ 2008 Express Edition/Visual studio tools folder in Program Files
To run a program as administrator in Vista, you must right-click the program icon and select the "Run as Administrator" option. If you don't run the program as administrator the fix WILL NOT WORK.
3. You should see a command entry. Now write this if you're using Windows Vista 32-bits:
cd c:\Program Files\
Or this if you're using Windows Vista 64-bits:
cd c:\Program Files (x86)\
Then press Enter
4. Write in the new command entry:
cd EA GAMES
Then hit Enter.
5. Write in the new command entry:
cd Battlefield Play4Free
Then hit Enter again.
6. NOW WRITE THIS:
editbin.exe /LARGEADDRESSAWARE BFP4f.exe
Then hit Enter. You should see some Microsoft copyright declaration thingy.
7. Close the window (it's the final step after a restart for Windows 64-bits users).
8. Run the Command prompt tool as Administrator once again and write this:
BCDEDIT /set increaseuserva 2900
Then press Enter and exit the program.
9. You made all that needed to be done. Now just restart your PC for the changes to take place and finally enjoy BFP4F without consistant MemoryDLL.dll crashes