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. Memory Tracking

Memory Tracking

Scheduled Pinned Locked Moved C / C++ / MFC
c++data-structurestoolsperformancequestion
4 Posts 2 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.
  • N Offline
    N Offline
    NullStream
    wrote on last edited by
    #1

    instead). Again the memory usage still rises (by about 4KB mind you [if the task manager can be believed... most of my memory allocation is of the single MAX_PATH and _MAX_FNAME chunks). Now thinking it could be from pass by value allocation I made sure and passed all my buffers by reference and yet it still rises. (eg MessageBox(MainWindow,(char*)&buffer,"cannot open item",0);) My last shot in the dark is maybe MessageBox is creating the leak by when clicking OK the message box is not freed by Windows or something. I know that's a stretch but I can't think of anything else. Are there any tools out there that I can use to determine where memory is being allocated and find possible leaks? (mind you I'm using char*'s and straight Win32SDK (aka no mfc)). Can anyone suggest what I can look for next? :confused: This is driving me absolutely batty. :mad: Sean

    C 1 Reply Last reply
    0
    • N NullStream

      instead). Again the memory usage still rises (by about 4KB mind you [if the task manager can be believed... most of my memory allocation is of the single MAX_PATH and _MAX_FNAME chunks). Now thinking it could be from pass by value allocation I made sure and passed all my buffers by reference and yet it still rises. (eg MessageBox(MainWindow,(char*)&buffer,"cannot open item",0);) My last shot in the dark is maybe MessageBox is creating the leak by when clicking OK the message box is not freed by Windows or something. I know that's a stretch but I can't think of anything else. Are there any tools out there that I can use to determine where memory is being allocated and find possible leaks? (mind you I'm using char*'s and straight Win32SDK (aka no mfc)). Can anyone suggest what I can look for next? :confused: This is driving me absolutely batty. :mad: Sean

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      grab a 14 day trial of Purify . it will spot most leaks in your app. -c


      Being just contaminates the void.
        --Robyn Hitchcock

      Image Processing - easy, like Sunday morning.

      N 1 Reply Last reply
      0
      • C Chris Losinger

        grab a 14 day trial of Purify . it will spot most leaks in your app. -c


        Being just contaminates the void.
          --Robyn Hitchcock

        Image Processing - easy, like Sunday morning.

        N Offline
        N Offline
        NullStream
        wrote on last edited by
        #3

        Well I did that and it stated I had no leaks in the application. Maybe I'm just trusting the Task Manager when I shouldn't be. Sean

        C 1 Reply Last reply
        0
        • N NullStream

          Well I did that and it stated I had no leaks in the application. Maybe I'm just trusting the Task Manager when I shouldn't be. Sean

          C Offline
          C Offline
          Chris Losinger
          wrote on last edited by
          #4

          if you're on NT/2K/XP, you can try calling _heapmin somewhere in your app. sometimes that will force the OS to minimize your app's heap (really free'ing memory you think you've already free'd, but which the OS hasn't given back to the general pool). sometimes it has no effect at all... -c


          Being just contaminates the void.
            --Robyn Hitchcock

          Image Processing - easy, like Sunday morning.

          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