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 859617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:42:11+00:00 2026-05-15T08:42:11+00:00

Every now and again I find myself doing something moderately dumb that results in

  • 0

Every now and again I find myself doing something moderately dumb that results in my program allocating all the memory it can get and then some.

This kind of thing used to cause the program to die fairly quickly with an “out of memory” error, but these days Windows will go out of its way to give this non-existent memory to the application, and in fact is apparently prepared to commit suicide doing so. Not literally of course, but it will starve itself of usable physical RAM so badly that even running the task manager will require half an hour of swapping (after all the runaway application is still allocating more and more memory all the time).

This doesn’t happen too often, but when it does it’s disastrous. I usually have to reset my machine, causing data loss from time to time and generally a lot of inconvenience.

Do you have any practical advice on making the consequences of such a mistake less dire? Perhaps some registry tweak to limit the max amount of virtual memory an app is allowed to allocate? Or some CLR flag that will limit this only for the current application? (It’s usually in .NET that I do this to myself.)

(“Don’t run out of RAM” and “Buy more RAM” are no use – the former I have no control over, and the latter I’ve already done.)

  • 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-15T08:42:11+00:00Added an answer on May 15, 2026 at 8:42 am

    You could keep a command prompt open whenever you run a risky app. Then, if it starts to get out of control, you don’t have to wait for Task Manager to load, just use:

    taskkill /F /FI "MEMUSAGE ge 2000000"
    

    This will (in theory) force kill anything using more than 2GB of memory.

    Use taskkill /? to get the full list of options it takes.

    EDIT: Even better, run the command as a scheduled task every few minutes. Any process that starts to blow up will get zapped automatically.

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

Sidebar

Related Questions

I am now to Django and i find that every time i change my
Every now and again, I need to start the Django development server, and have
I'm running Django on Linux using fcgi and Lighttpd. Every now and again (about
Every now and then I receive a Word Document that I have to display
A term that I see every now and then is Cyclomatic Complexity. Here on
I find myself in a quandry that I think I know the solution to
Every now and again, I make use of the Eclipse refactoring feature. Some techniques
I find myself again and again faced with a similar problem: there's some piece
I find it sometimes annoying that I have to initialise all POD-types manually. E.g.
Every now and then (ahem...) my code crashes on some system; quite often, my

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.