|
| |||||||||
| Tags: application, bad allocation exception, service pack 3, windows xp |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| application crashes with a bad allocation exception
Hi everybody!! I'm working with Windows XP Professional SP3. My computer has 3GB RAM. I modified my boot.ini to allow processes to use 3GB. I'm trying to run an application developed by me in C++. My problem is: the memory usage of this application increases and decreases, staying always under 1GB, but the PF usage increases, and increases, even when the memory is decreasing, and when it gets 2,48 GB, the application crashes with a bad_allocation exception. I have no idea of what to do to reduce the PF usage. Could anybody give me a hand, please? Thanks in advance!! EDIT: One more detail: Even if the application shows just 200MB of memory usage, if I kill the process, then the PF usage reduces in 2GB, more or less. I'm totally stuck. I would appreciate any help!! Last edited by Patrida : 17-08-2009 at 10:21 PM. |
|
#2
| |||
| |||
| application crashes with a bad allocation exception
You would be facing this issue because it might happen that your motherboard doesn't support your RAM, in most of the cases if you are using 1gb RAM and 2gb RAM then your motherboard won't support it because both RAM should be same either you need to use two 2gb RAM or two 1gb RAM. |
|
#3
| |||
| |||
| Re: application crashes with a bad allocation exception
May be the application is faulty. Please check if your C++ application works well on any other computer & see if same problem occurs, in this way you will come to know if the problem is with your C++ application or is it anything else. I hope this helps. (Please check your code.) |
|
#4
| |||
| |||
| Re: application crashes with a bad allocation exception
Thanks for your answers! I'm pretty sure the code is OK, cause it's working for other inputs. I will try with other Windows, and also with Linux, to see what happens.... Thanks again! |
|
#5
| |||
| |||
| Re: application crashes with a bad allocation exception
Just one more question: how can I know the memory associated to one process, the real one? I mean, when this process is running, after 15 min, its memory usage, according to Processes tab of Task Manager, is 28236 KB, and the PF usage is 2213 MB. If I end the process, the PF usage decreases until 491 MB. If I'm not wrong, it means that the process was using 1724 MB, but this fact wasn't reflected in Processes tab.... ?!?! Can you explain why this is happening? Thanks again!! |
|
#6
| ||||
| ||||
| Re: application crashes with a bad allocation exception
It is actually a rare case where page does not shows up correct memory usage. It can be a configuration problem. So try one thing. Re-configure it back again as per the listed solution and then check out again. It is recommended that whenever you have any problem related to Page File you must increase the size of your RAM by adding more sticks. First click on Start > control panel > system & maint. > system. Go to Advance system setting from the left side and then under performance choose settings. Go to the advance tab and click on change under virtual memory. Clear the check bot of “Automatically manage paging file size for all drives and then Under each drive label select custom size. Add your size and then click on on Set > Ok, |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "application crashes with a bad allocation exception" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Outlook 2010 64bit crashes on Win7 Ultimate after launch - exception code : 0xc0000005 | HeerePanna | Windows Software | 5 | 16-10-2010 03:50 AM |
| Mac Crashes - Exception: EXC_BAD_ACCESS (0x0001) | Xmen | Operating Systems | 3 | 10-11-2009 10:35 PM |
| Exception Handling Application Block using Enterprise Library 4.0 | Bofinn | Software Development | 2 | 07-02-2009 05:46 PM |
| Application has generated an exception | Don | MediaCenter | 4 | 03-12-2008 12:48 AM |
| ehshell.exe - Application has generated an exception... | JoshS | MediaCenter | 3 | 11-04-2006 10:24 PM |