Memory used by a specific process

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Avi

    #1

    Memory used by a specific process

    Hi all,



    In my program I need to know the memory used by certain applications. I was
    able to get the free available memory on the machine, but not the memory
    that is used by a specific application.



    Is there a way of doing it?



    Thanks,

    Avi




  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: Memory used by a specific process

    Avi,

    You will have to look at the performance counters for the system, and
    get the memory for a specific instance of an app.

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "Avi" <m@m.comwrote in message news:eg0j0b$4l0 $1@news2.netvis ion.net.il...
    Hi all,
    >
    >
    >
    In my program I need to know the memory used by certain applications. I
    was able to get the free available memory on the machine, but not the
    memory that is used by a specific application.
    >
    >
    >
    Is there a way of doing it?
    >
    >
    >
    Thanks,
    >
    Avi
    >
    >
    >
    >

    Comment

    • Willy Denoyette [MVP]

      #3
      Re: Memory used by a specific process


      "Avi" <m@m.comwrote in message news:eg0j0b$4l0 $1@news2.netvis ion.net.il...
      | Hi all,
      |
      |
      |
      | In my program I need to know the memory used by certain applications. I
      was
      | able to get the free available memory on the machine, but not the memory
      | that is used by a specific application.
      |
      |
      |
      | Is there a way of doing it?
      |
      |
      |
      | Thanks,
      |
      | Avi
      |

      The System.Diagnost ics.Process class holds a lot of memory related
      properties, is there anything specific you are missing.

      Willy.


      Comment

      • Avi

        #4
        Re: Memory used by a specific process

        Thanks all,



        I used to use the performance counters' "Available MBytes" which gave me the
        machine available memory which was not enough for me. I found the counter I
        needed "Private Bytes" which gives the memory used by a single process



        Thanks for all your help,





        "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard .caspershouse.c omwrote in
        message news:OfEWdl85GH A.4536@TK2MSFTN GP06.phx.gbl...
        Avi,
        >
        You will have to look at the performance counters for the system, and
        get the memory for a specific instance of an app.
        >
        Hope this helps.
        >
        >
        --
        - Nicholas Paldino [.NET/C# MVP]
        - mvp@spam.guard. caspershouse.co m
        >
        "Avi" <m@m.comwrote in message
        news:eg0j0b$4l0 $1@news2.netvis ion.net.il...
        >Hi all,
        >>
        >>
        >>
        >In my program I need to know the memory used by certain applications. I
        >was able to get the free available memory on the machine, but not the
        >memory that is used by a specific application.
        >>
        >>
        >>
        >Is there a way of doing it?
        >>
        >>
        >>
        >Thanks,
        >>
        >Avi
        >>
        >>
        >>
        >>
        >
        >

        Comment

        Working...