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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:48:18+00:00 2026-05-20T23:48:18+00:00

I am a developer on a large commercial program, and I am trying to

  • 0

I am a developer on a large commercial program, and I am trying to track down a particular C++ memory leak. I would like to use Visual Studio to search the entire valid address space of my process, but I can not see how to perform this search effectively.

I am aware of the .s command documentation here, but it is not doing what I need. For examle, I am 100% certain that the address 0xfdfd240 contains the value 0x0f0e34a8. I can successfully use the .s command to search near that address like this:

.s -d 0x0fdfd200 L256000000 0x0f0e34a8
Found match at
0xfdfd240

But my program has made many small allocations which have left me with many small non-contiguious sections of memory. If I back up a few thousand bytes the search command fails:

.s -d 0x0fd00000 L256000000 0x0f0e34a8
Memory location could not be read. Please specify a valid memory location.

And it also appears that the search command does not attempt to search forward any more when it finds it’s first bad address, even if there are valid addresses beyond it.

.s -d 0x0f000000 L256000000 0x0f0e34a8
No match was found

I’m vaguely aware that there is a way to ask windows what memory ranges are valid for a given process, so I’m considering writing a small throwaway program to harvest that information and then automate a series of search commands to the Immediate Window…but it seems like someone must have dealt with this before, and must have done something smarter.

Also, I can extract a dump file of the running process, so if anyone can recommend third party tools to feed the dump to that has stronger search functionality that should work out as well.

Any suggestions?

Edit: I see this behavior in VS2008SP1 and VS2010SP1.

  • 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-20T23:48:18+00:00Added an answer on May 20, 2026 at 11:48 pm

    When doing anything beyond simple debugging, I find that often times WinDbg (part of Debugging Tools for Windows) has far better capability.

    And you don’t even have to do all your debugging from WinDbg. If you are in VS doing your thing and then want to search memory (or do other things which are not easy in VS), go to Debug -> Save Dump As… Make sure to select “Minidump with Heap” file type.

    This will create a complete snapshot file of your process. Load that up into WinDbg and now you have oh some many cool commands at your disposal. For easy access to the documentation, you can always type “.hh” in the command window. All Commands are listed under Debuggers -> Debugger Reference -> Debugger Commands.

    The one you want is s (Search Memory)

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

Sidebar

Related Questions

I'm building an ASP.net application using Visual Studio Web Developer 2010 Express and have
It's been mentioned to me that I'll be the sole developer behind a large
My studio has a large codebase that has been developed over 10+ years. The
Since there is a large pool of passionate developers in this community, I would
I was recently using a commercial centrally controlled version control system in a large
As a .Net developer I spend a large portion of my day working in
I am a good PHP developer and wanted to develop a large scale web
I have used Visual Studio Professional 2008, and have been testing the free C#
I'm working on a Python project where a previous developer placed a large portion
We have developed a large number of websites using ASP (jscript flavour), talking to

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.