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. win32 exe memory usage issue

win32 exe memory usage issue

Scheduled Pinned Locked Moved C / C++ / MFC
performancehelp
12 Posts 7 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.
  • A Offline
    A Offline
    Ash_VCPP
    wrote on last edited by
    #1

    Hi All, i have one win32 exe and after executing it, in the task manager the memory usage is increasing even there is nothing to process for exe.At the starting its size is 150kb but it is increasing up to 10 mb. so please can anyone tell me the possible reasons and solutions.

    Thanks A Ton Ash_VCPP walking over water is just knowing where the stones are.....

    O _ R C 4 Replies Last reply
    0
    • A Ash_VCPP

      Hi All, i have one win32 exe and after executing it, in the task manager the memory usage is increasing even there is nothing to process for exe.At the starting its size is 150kb but it is increasing up to 10 mb. so please can anyone tell me the possible reasons and solutions.

      Thanks A Ton Ash_VCPP walking over water is just knowing where the stones are.....

      O Offline
      O Offline
      Obsidianhom
      wrote on last edited by
      #2

      you have memory leak. check your program that every new function match a delete function. remember to release every resource you have got.

      A 1 Reply Last reply
      0
      • A Ash_VCPP

        Hi All, i have one win32 exe and after executing it, in the task manager the memory usage is increasing even there is nothing to process for exe.At the starting its size is 150kb but it is increasing up to 10 mb. so please can anyone tell me the possible reasons and solutions.

        Thanks A Ton Ash_VCPP walking over water is just knowing where the stones are.....

        _ Offline
        _ Offline
        _AnsHUMAN_
        wrote on last edited by
        #3

        You have got tools to detect whether you have a memory leak. Search for BoundsChecker or Rationals Purify plus.

        You need to google first, if you have "It's urgent please" mentioned in your question. ;-)_AnShUmAn_

        A 1 Reply Last reply
        0
        • A Ash_VCPP

          Hi All, i have one win32 exe and after executing it, in the task manager the memory usage is increasing even there is nothing to process for exe.At the starting its size is 150kb but it is increasing up to 10 mb. so please can anyone tell me the possible reasons and solutions.

          Thanks A Ton Ash_VCPP walking over water is just knowing where the stones are.....

          R Offline
          R Offline
          Rajesh R Subramanian
          wrote on last edited by
          #4

          Does your debugger report memory leaks in the output window after your binary finishes execution (in debug mode)?

          It is a crappy thing, but it's life -^ Carlo Pallini

          A 1 Reply Last reply
          0
          • O Obsidianhom

            you have memory leak. check your program that every new function match a delete function. remember to release every resource you have got.

            A Offline
            A Offline
            Ash_VCPP
            wrote on last edited by
            #5

            hi, i checked new/delete sequence there is all fine, is there anything else which can cause memory leak or how can i detect memory leak...

            Thanks A Ton Ash_VCPP walking over water is just knowing where the stones are.....

            R 1 Reply Last reply
            0
            • R Rajesh R Subramanian

              Does your debugger report memory leaks in the output window after your binary finishes execution (in debug mode)?

              It is a crappy thing, but it's life -^ Carlo Pallini

              A Offline
              A Offline
              Ash_VCPP
              wrote on last edited by
              #6

              actually i used dbgcntrl apis which shows me dumped memory leaks like this:

              strcore.cpp(118) : {83} normal block at 0x008C2F50, 156 bytes long.
              Data: < Prov> 01 00 00 00 8F 00 00 00 8F 00 00 00 50 72 6F 76
              strcore.cpp(118) : {80} normal block at 0x008C10B0, 33 bytes long.
              Data: < C:\P> 02 00 00 00 14 00 00 00 14 00 00 00 43 3A 5C 50
              strcore.cpp(118) : {77} normal block at 0x008C1150, 18 bytes long.
              Data: < 5555> 01 00 00 00 05 00 00 00 05 00 00 00 35 35 35 35
              strcore.cpp(118) : {74} normal block at 0x008C1190, 26 bytes long.
              Data: < 192.> 01 00 00 00 0D 00 00 00 0D 00 00 00 31 39 32 2E
              {62} normal block at 0x008C14B0, 33 bytes long.
              Data: < C > 00 43 00 CD CD CD CD CD CD CD CD CD CD CD CD CD
              {61} normal block at 0x008C1500, 40 bytes long.
              Data: < |L > 14 7C 4C 10 16 00 00 00 00 00 00 00 00 00 00 00
              {59} client block at 0x008C1610, subtype 0, 64 bytes long.
              a CDynLinkLibrary object at $008C1610, 64 bytes long
              {54} client block at 0x008C1790, subtype 0, 64 bytes long.
              a CDynLinkLibrary object at $008C1790, 64 bytes long
              {52} client block at 0x008C18B0, subtype 0, 64 bytes long.
              a CDynLinkLibrary object at $008C18B0, 64 bytes long
              Object dump complete.

              but i dont have strcore.cpp file in my workspace and i dont understand the meaning of other errors....

              Thanks A Ton Ash_VCPP walking over water is just knowing where the stones are.....

              L R 2 Replies Last reply
              0
              • A Ash_VCPP

                actually i used dbgcntrl apis which shows me dumped memory leaks like this:

                strcore.cpp(118) : {83} normal block at 0x008C2F50, 156 bytes long.
                Data: < Prov> 01 00 00 00 8F 00 00 00 8F 00 00 00 50 72 6F 76
                strcore.cpp(118) : {80} normal block at 0x008C10B0, 33 bytes long.
                Data: < C:\P> 02 00 00 00 14 00 00 00 14 00 00 00 43 3A 5C 50
                strcore.cpp(118) : {77} normal block at 0x008C1150, 18 bytes long.
                Data: < 5555> 01 00 00 00 05 00 00 00 05 00 00 00 35 35 35 35
                strcore.cpp(118) : {74} normal block at 0x008C1190, 26 bytes long.
                Data: < 192.> 01 00 00 00 0D 00 00 00 0D 00 00 00 31 39 32 2E
                {62} normal block at 0x008C14B0, 33 bytes long.
                Data: < C > 00 43 00 CD CD CD CD CD CD CD CD CD CD CD CD CD
                {61} normal block at 0x008C1500, 40 bytes long.
                Data: < |L > 14 7C 4C 10 16 00 00 00 00 00 00 00 00 00 00 00
                {59} client block at 0x008C1610, subtype 0, 64 bytes long.
                a CDynLinkLibrary object at $008C1610, 64 bytes long
                {54} client block at 0x008C1790, subtype 0, 64 bytes long.
                a CDynLinkLibrary object at $008C1790, 64 bytes long
                {52} client block at 0x008C18B0, subtype 0, 64 bytes long.
                a CDynLinkLibrary object at $008C18B0, 64 bytes long
                Object dump complete.

                but i dont have strcore.cpp file in my workspace and i dont understand the meaning of other errors....

                Thanks A Ton Ash_VCPP walking over water is just knowing where the stones are.....

                L Offline
                L Offline
                Luc Pattyn
                wrote on last edited by
                #7

                Hi, these add up to a few KB at most, and won't explain what you are seeing. So there probably is no memory leak. Are you allocating some large data structures, say an array of several MB, even when there isn't any reason to already allocate such? :)

                Luc Pattyn [Forum Guidelines] [My Articles]


                Avoiding unwanted divs (as in "articles needing approval") with the help of this FireFox add-in


                A 1 Reply Last reply
                0
                • L Luc Pattyn

                  Hi, these add up to a few KB at most, and won't explain what you are seeing. So there probably is no memory leak. Are you allocating some large data structures, say an array of several MB, even when there isn't any reason to already allocate such? :)

                  Luc Pattyn [Forum Guidelines] [My Articles]


                  Avoiding unwanted divs (as in "articles needing approval") with the help of this FireFox add-in


                  A Offline
                  A Offline
                  Ash_VCPP
                  wrote on last edited by
                  #8

                  Actually i am receiving some data from server which i am taking in a char * array and after end of story i am deleting it.....and there is nothing big array i am processing with axcept above one....

                  Thanks A Ton Ash_VCPP walking over water is just knowing where the stones are.....

                  1 Reply Last reply
                  0
                  • A Ash_VCPP

                    actually i used dbgcntrl apis which shows me dumped memory leaks like this:

                    strcore.cpp(118) : {83} normal block at 0x008C2F50, 156 bytes long.
                    Data: < Prov> 01 00 00 00 8F 00 00 00 8F 00 00 00 50 72 6F 76
                    strcore.cpp(118) : {80} normal block at 0x008C10B0, 33 bytes long.
                    Data: < C:\P> 02 00 00 00 14 00 00 00 14 00 00 00 43 3A 5C 50
                    strcore.cpp(118) : {77} normal block at 0x008C1150, 18 bytes long.
                    Data: < 5555> 01 00 00 00 05 00 00 00 05 00 00 00 35 35 35 35
                    strcore.cpp(118) : {74} normal block at 0x008C1190, 26 bytes long.
                    Data: < 192.> 01 00 00 00 0D 00 00 00 0D 00 00 00 31 39 32 2E
                    {62} normal block at 0x008C14B0, 33 bytes long.
                    Data: < C > 00 43 00 CD CD CD CD CD CD CD CD CD CD CD CD CD
                    {61} normal block at 0x008C1500, 40 bytes long.
                    Data: < |L > 14 7C 4C 10 16 00 00 00 00 00 00 00 00 00 00 00
                    {59} client block at 0x008C1610, subtype 0, 64 bytes long.
                    a CDynLinkLibrary object at $008C1610, 64 bytes long
                    {54} client block at 0x008C1790, subtype 0, 64 bytes long.
                    a CDynLinkLibrary object at $008C1790, 64 bytes long
                    {52} client block at 0x008C18B0, subtype 0, 64 bytes long.
                    a CDynLinkLibrary object at $008C18B0, 64 bytes long
                    Object dump complete.

                    but i dont have strcore.cpp file in my workspace and i dont understand the meaning of other errors....

                    Thanks A Ton Ash_VCPP walking over water is just knowing where the stones are.....

                    R Offline
                    R Offline
                    Rajesh R Subramanian
                    wrote on last edited by
                    #9

                    Ash_VCPP wrote:

                    {62} normal block at 0x008C14B0, 33 bytes long. Data: < C > 00 43 00 CD CD CD CD CD CD CD CD CD CD CD CD CD {61} normal block at 0x008C1500, 40 bytes long. Data: < |L > 14 7C 4C 10 16 00 00 00 00 00 00 00 00 00 00 00 {59} client block at 0x008C1610, subtype 0, 64 bytes long.

                    There are probably source files where new isn't redefined to DEBUG_NEW (probably you added some C/C++ files yourself?). Try to add this definition to all the source files where it isn't present:

                    #ifdef _DEBUG
                    #define new DEBUG_NEW
                    #endif

                    This will enable the debugger to display the exact line numbers in your program where there were memory allocations (that weren't cleaned up).

                    Ash_VCPP wrote:

                    but i dont have strcore.cpp file in my workspace and i dont understand the meaning of other errors....

                    Leaks at strcore.cpp most likely means that you are misusing strings in your program (improper shutdown/termination of a thread that was using strings?). That becomes too much of a big topic to discuss in a reply.

                    It is a crappy thing, but it's life -^ Carlo Pallini

                    1 Reply Last reply
                    0
                    • _ _AnsHUMAN_

                      You have got tools to detect whether you have a memory leak. Search for BoundsChecker or Rationals Purify plus.

                      You need to google first, if you have "It's urgent please" mentioned in your question. ;-)_AnShUmAn_

                      A Offline
                      A Offline
                      Ash_VCPP
                      wrote on last edited by
                      #10

                      Hi Anshuman, i serched for both the tool and i think purifyplus is free downlable but i dont know how to use it so can you please tell me which tool ishould use(depending its a freeware) and where i can get details of using the tool as i didnt got anything on it after googling....:confused:

                      Thanks A Ton Ash_VCPP walking over water is just knowing where the stones are.....

                      1 Reply Last reply
                      0
                      • A Ash_VCPP

                        Hi All, i have one win32 exe and after executing it, in the task manager the memory usage is increasing even there is nothing to process for exe.At the starting its size is 150kb but it is increasing up to 10 mb. so please can anyone tell me the possible reasons and solutions.

                        Thanks A Ton Ash_VCPP walking over water is just knowing where the stones are.....

                        C Offline
                        C Offline
                        China_Kevin
                        wrote on last edited by
                        #11

                        If your codes is not very long,put it out. We can find the problem for you. I think that must be a memory leak. I am a Chinese boy.My English is poor...

                        1 Reply Last reply
                        0
                        • A Ash_VCPP

                          hi, i checked new/delete sequence there is all fine, is there anything else which can cause memory leak or how can i detect memory leak...

                          Thanks A Ton Ash_VCPP walking over water is just knowing where the stones are.....

                          R Offline
                          R Offline
                          Rolf Kristensen
                          wrote on last edited by
                          #12

                          Visual Leak Detector[^] is a good friend.

                          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