GDI Resources
-
I'm back again with the same old bullshit. I can't figure out what the deal is. The app runs fine on 2000, XP, and NT. I watch the GDI resources in the task list of 2000 and XP and the number of GDI objects being used does increase slightly during execution of the application when I perform specific operations. Not a tremendous amount, though--It's tolerable. The problem is, when I run it on Windows 98, the % of GDI resources being used goes up significantly when I perform those same operations and soon enough, the app crashes because the computer is out of memory. I'm not sure what could be the difference between XP/2000/NT and 98 as far as GDI resources are concerned. Can anyone help me out?
-
I'm back again with the same old bullshit. I can't figure out what the deal is. The app runs fine on 2000, XP, and NT. I watch the GDI resources in the task list of 2000 and XP and the number of GDI objects being used does increase slightly during execution of the application when I perform specific operations. Not a tremendous amount, though--It's tolerable. The problem is, when I run it on Windows 98, the % of GDI resources being used goes up significantly when I perform those same operations and soon enough, the app crashes because the computer is out of memory. I'm not sure what could be the difference between XP/2000/NT and 98 as far as GDI resources are concerned. Can anyone help me out?
Oops, sounds similar to my problem. I have tried only Win98, and I see the same symptoms when I'm stepping into my program with the debugger. Doesn't happen in any other case... Can you describe in which circumstances you see your problem? App running alone, in Visual, in the debugger...? Thanks, Eric
-
I'm back again with the same old bullshit. I can't figure out what the deal is. The app runs fine on 2000, XP, and NT. I watch the GDI resources in the task list of 2000 and XP and the number of GDI objects being used does increase slightly during execution of the application when I perform specific operations. Not a tremendous amount, though--It's tolerable. The problem is, when I run it on Windows 98, the % of GDI resources being used goes up significantly when I perform those same operations and soon enough, the app crashes because the computer is out of memory. I'm not sure what could be the difference between XP/2000/NT and 98 as far as GDI resources are concerned. Can anyone help me out?
98 has a limited ammount of memory (128K I think) that can be used for resources while NT does not (other than available memory of course). You state that your application has a resource leak, begin by fixing this. Make sure that you aren't keeping allocated resources around, you need to allocate and free them for each use. Keeping things like bitmaps around as datamembers is a sure way of running our of resources. Chris Hafey
-
98 has a limited ammount of memory (128K I think) that can be used for resources while NT does not (other than available memory of course). You state that your application has a resource leak, begin by fixing this. Make sure that you aren't keeping allocated resources around, you need to allocate and free them for each use. Keeping things like bitmaps around as datamembers is a sure way of running our of resources. Chris Hafey
Actually, I'm trying to figure out why the fixes that I made to the app to get rid of the memory leaks work in 2000, XP, and NT, but they don't work in 98. I fixed a few things in the app that I found were causing leaks and changed a few things. When I run the app in 2000, XP, or NT, I don't see any increase in GDI resource allocation other than for things like dialogs etc... More often than not, the resource level comes back down to about what it started at. On the other hand, when I run the same app in 98, I run out of resources quite rapidly and it ends up shutting the app down. I'm just trying to find out why my changes work in one OS and not in another.
-
98 has a limited ammount of memory (128K I think) that can be used for resources while NT does not (other than available memory of course). You state that your application has a resource leak, begin by fixing this. Make sure that you aren't keeping allocated resources around, you need to allocate and free them for each use. Keeping things like bitmaps around as datamembers is a sure way of running our of resources. Chris Hafey
Great, I've isolated my debugging problem thanks to your help. I'm simply debugging in one thread while another thread keeps refreshing the window in my back. Of course, because I'm stepping slowly, the resources keeps buffering in the refresh and the whole thing explodes rather quickly (somewhere out of my scope, I'm afraid). At least, I know now a walkaround. Thanks again, Eric