Results 1 to 6 of 6

Thread: application crashes with a bad allocation exception

  1. #1
    Join Date
    Aug 2009
    Posts
    3

    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 09:21 PM.

  2. #2
    Join Date
    Nov 2005
    Posts
    403

    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. #3
    Join Date
    Oct 2008
    Posts
    100

    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. #4
    Join Date
    Aug 2009
    Posts
    3

    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. #5
    Join Date
    Aug 2009
    Posts
    3

    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. #6
    Join Date
    Jan 2008
    Posts
    3,388

    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,

Similar Threads

  1. Replies: 5
    Last Post: 17-03-2011, 10:53 AM
  2. Replies: 5
    Last Post: 16-10-2010, 02:50 AM
  3. Application crashes in mac
    By Raulf in forum Operating Systems
    Replies: 5
    Last Post: 04-03-2010, 08:33 AM
  4. Mac Crashes - Exception: EXC_BAD_ACCESS (0x0001)
    By Xmen in forum Operating Systems
    Replies: 3
    Last Post: 10-11-2009, 10:35 PM
  5. Replies: 2
    Last Post: 07-02-2009, 05:46 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,944,815.72904 seconds with 17 queries