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

  • SEARCH
  • Home
  • 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 372847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:15:01+00:00 2026-05-12T14:15:01+00:00

Related to my previous question: Preventing Memory issues when handling large amounts of text

  • 0

Related to my previous question:
Preventing Memory issues when handling large amounts of text

Is there a way to determine how much memory space my program is occupying? I end up processing a large amount of text file and usually store the processed objects in memory. There are times where there will be too much information, and I will run out of memory. I have a solution for avoiding the memory allocation problem, but I only want to use it when necessary, to avoid paging, which will ultimately decrease my performance when it’s not necessary. Is there a way to figure out how much memory I am occupying, so that I can page my information only when necessary?

NOTE: I am looking for a solution that my program can utilize to begin paging when necessary.

  • 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-12T14:15:01+00:00Added an answer on May 12, 2026 at 2:15 pm

    You can try GC.GetTotalMemory:

    Retrieves the number of bytes
    currently thought to be allocated. A
    parameter indicates whether this
    method can wait a short interval
    before returning, to allow the system
    to collect garbage and finalize
    objects.

    The important thing to note is this part: “Retrieves the number of bytes currently thought to be allocated”. This means that this method may not be 100% accurate – as long as you know this going in, you should be able to get a rough idea of your virtual memory utilization at a given point in your application execution.

    Edit: Let me now offer a different solution that will probably be more productive: use perfmon and the CLR performance counters.

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

Sidebar

Related Questions

Very much related to my previous question , but I found this to be
Related to my previous question , is there some realistic chance to extract surveillance
(This question is loosely related to my previous question ) Hello there. I have
So this question is (somewhat distantly) related to this previous question: Best way to
This is related to my previous question, but will navigator.onLine work if there is
Related to my previous question , I have a string on the following format:
This is related to my previous question I'm solving UVA's Edit Step Ladders and
This question is related to a previous question of mine That's my current code
This is related to my previous question More than 1 Left joins in MSAccess
This is related to my previous question here . I want 4 divs (absolute

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.