Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. GDI Resources

GDI Resources

Scheduled Pinned Locked Moved C / C++ / MFC
helpgraphicsperformancequestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Stew
    wrote on last edited by
    #1

    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?

    J A 2 Replies Last reply
    0
    • S Stew

      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?

      J Offline
      J Offline
      Jiminy
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • S Stew

        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?

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        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

        S J 2 Replies Last reply
        0
        • A Anonymous

          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

          S Offline
          S Offline
          Stew
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          • A Anonymous

            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

            J Offline
            J Offline
            Jiminy
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups