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. How to get thread used memory size?

How to get thread used memory size?

Scheduled Pinned Locked Moved C / C++ / MFC
performancetutorialquestion
4 Posts 4 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.
  • H Offline
    H Offline
    hanlei0000000009
    wrote on last edited by
    #1

    m_hThread1 = CreateThread(NULL, 0, ThreadFun1, this, 0, &m_dw1); // thread 1 m_hThread2 = CreateThread(NULL, 0, ThreadFun2, this, 0, &m_dw2); // thread 2 How to get thread 1 using memory size when program run.

    M L 2 Replies Last reply
    0
    • H hanlei0000000009

      m_hThread1 = CreateThread(NULL, 0, ThreadFun1, this, 0, &m_dw1); // thread 1 m_hThread2 = CreateThread(NULL, 0, ThreadFun2, this, 0, &m_dw2); // thread 2 How to get thread 1 using memory size when program run.

      M Offline
      M Offline
      Maximilien
      wrote on last edited by
      #2

      yoda speak ?!!? Sure i am not what talking you are. Seriously, it depends what the thread is doing; and normally, it's the same way as find finding out what the current/main thread is doing.

      Maximilien Lincourt Your Head A Splode - Strong Bad

      D 1 Reply Last reply
      0
      • H hanlei0000000009

        m_hThread1 = CreateThread(NULL, 0, ThreadFun1, this, 0, &m_dw1); // thread 1 m_hThread2 = CreateThread(NULL, 0, ThreadFun2, this, 0, &m_dw2); // thread 2 How to get thread 1 using memory size when program run.

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

        Hi, a thread does not use memory, except for its stack; when it creates some objects, they will occupy some memory, but they do not belong to the thread, and they sit in the heap, common to all threads of the process. :)

        Luc Pattyn [Forum Guidelines] [My Articles]


        This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.


        1 Reply Last reply
        0
        • M Maximilien

          yoda speak ?!!? Sure i am not what talking you are. Seriously, it depends what the thread is doing; and normally, it's the same way as find finding out what the current/main thread is doing.

          Maximilien Lincourt Your Head A Splode - Strong Bad

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          Maximilien wrote:

          yoda speak ?!!? Sure i am not what talking you are.

          Or: What you are talking about, I am not sure of.

          "Love people and use things, not love things and use people." - Unknown

          "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

          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