Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 201779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:13:45+00:00 2026-05-11T17:13:45+00:00

I have a medium-sized process viewer which uses around ~40MB of private memory on

  • 0

I have a medium-sized process viewer which uses around ~40MB of private memory on Windows Vista. The problem is that people always compare this number to the amount of memory used by Process Explorer and similar, unmanaged tools.

I’ve noticed that when my program is idle, there are 13 running threads:

  • One RPC thread (RPCRT4.dll!ThreadStartRoutine)
  • One COM-related thread (ole32.dll!CoRegisterSurrogateEx+0x35e0)
  • Two ntdll threads (ntdll.dll!TppWorkerThread, ntdll.dll!TppWaiterpThread)
  • The main GUI thread
  • A timer thread (used by the CLR)
  • The gate thread (CLR)
  • The debugger thread (CLR)
  • 4 worker threads (mscorwks.dll!Thread::intermediateThreadProc)
  • And finally a GDI+ background thread (gdiplus.dll!BackgroundThreadProc)

How can I get rid of some of these threads, freeing thread stack memory (1MB each)? ThreadPool.GetAvailableThreads tells me that there are 0 worker threads running, but there are 3 “intermediateThreadProc” threads. Could using the service manager API have anything to do with the RPC thread? (It makes RPC calls.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T17:13:45+00:00Added an answer on May 11, 2026 at 5:13 pm

    13 threads is pretty low. Unfortunately, you won’t be able to get rid of most of these threads without cutting functionality.

    Getting rid of RPC & COM is most likely not possible for a managed app, and the CLR threads all seem to be doing something useful. I’m guessing you’re using GDI+ (probably via System.Drawing.) Even though there are 0 worker threads running, the threadpool has the threads “on standby”, ready to start. You don’t want posting a work item to have to incur the overhead of creating a new thread in an idle process.

    Even though you may be using 40 MB of private memory, this is most likely not due to the number of threads. Even if each thread was fully using it’s 1 MB of default stack (which they’re definitenly not, most of the stack is reserved but not committed and won’t show up as private bytes), that is only 13 MB of the 40 MB you’re seeing. Can you use CLR Profiler to see what allocations your application is doing?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a medium sized application that runs as a .net web-service which I
I have several medium-sized data sets in-memory that I need to be able to
I have a medium-sized Java project in Eclipse, which uses Vector<E> instead of the
We have a medium sized .js file that we include in our web framework
I have two medium-sized web applications that I'm merging into one. They are both
I have a medium sized WinForm App ( 1 Form that hosts 40 user
I have a few medium-sized Rails apps that I work on routinely, and only
I have a series of medium-sized XML documents, which are mainly text with a
I have taken over a medium sized project that was written originally using RoR.
We have a medium sized application that depends on several usercontrols, namely: A tablelayout

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.