Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Low resource errors

Status
Not open for further replies.

sputnic

Programmer
Dec 24, 2000
6
US
Hi, I have a fairly large program, I started writing it before I understood how to seperate it into smaller chunks, anyway, I try to run it in debug mode by pressing the play key and it may run once, then when I do it again after adjusting the program to fix something it gives me the blue screen of death, when I hit a key it comes back and starts to tell me that I am low on resources, then I have to re-boot. I have 156megs of ram, does anyone know if there is a limit on size or windows???
thanx
 
There are lots of reason why Windows can run out of resources even if your RAM approaches infinity.

Failing to release a handle to a device context more than 6 times (It may be more in newer Windows versions) Calling GetDC(hwnd) 6 times without calling ReleaseDC is an example of this....

Windows has a limited number of global memory handles (I think it is 4096) Allocate a bunch of small memory blocks and you'll run outa handles before RAM...

etc...




Kim_Christensen@telus.net
 
Some other things to look at is your virtual memory. A lot of OS's swaps memory to your hard drive. In Windows, if your virtual memory is too small, it can't handle it.

Also, you didn't mention how you are compiling (DOS, Windows, Console, etc) your program. You may want to look at some of your compiler options.
James P. Cottingham
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top