Out-Of-Memory
-
Hi! I'm building a application in VC++ .NET. But when i run it it says to me that it's Out-Of-Memory. The memory on the computer is not full... How do you get rid of this problem? Can you give the program more memory? Regards, Koo
Are you allocating a large amount of memory?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
-
Hi! I'm building a application in VC++ .NET. But when i run it it says to me that it's Out-Of-Memory. The memory on the computer is not full... How do you get rid of this problem? Can you give the program more memory? Regards, Koo
Is all the memory allocation on the Stack? Or are you allocating on the heap? Ant.
-
Is all the memory allocation on the Stack? Or are you allocating on the heap? Ant.
-
If you have Windows 2000 or XP, look at the Performance tab of Task Manager to see the machine's memory usage. What does it look like before and during the program's execution?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
-
What I meant was are you allocation memory to data statically or dynamically. i.e.
char data[1000000]; // Or some large numbers
or
char* pdata;
pdata = new char[1000000];
delete [] pdata;If you are running through the debugger you should be able to see what it is that is failing to allocate. If you look at the call stack, what is being called? Ant.
-
If you have Windows 2000 or XP, look at the Performance tab of Task Manager to see the machine's memory usage. What does it look like before and during the program's execution?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
-
Which makes no sense. Look at the Task Manager before your program runs, write down the memory-related numbers. Look at the Task Manager while your program runs, write down the memory-related numbers. Compare those numbers. What do they tell you?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
-
Which makes no sense. Look at the Task Manager before your program runs, write down the memory-related numbers. Look at the Task Manager while your program runs, write down the memory-related numbers. Compare those numbers. What do they tell you?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
-
Ok, can you post the exact verbiage of the out-of-memory message?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
-
What I meant was are you allocation memory to data statically or dynamically. i.e.
char data[1000000]; // Or some large numbers
or
char* pdata;
pdata = new char[1000000];
delete [] pdata;If you are running through the debugger you should be able to see what it is that is failing to allocate. If you look at the call stack, what is being called? Ant.
-
Ok, can you post the exact verbiage of the out-of-memory message?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
-
It comes in a messagebox: Unhandled exception at 0x77e73887 in net32.exe: Microsoft C++ exception: CMemoryException @ 0x00f5f3a4.
Sounds like you need to compile in debug mode, and use F5 to start the program.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
-
If this is a C++ program use
new
/delete
instead.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
-
When you look at the call stack is it calling the same function over and over again? I.e. trying to allocate 22bytes over and over again? Ant.