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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:00:52+00:00 2026-05-26T13:00:52+00:00

I have a question out of curiosity relating to checking for memory leaks. Being

  • 0

I have a question out of curiosity relating to checking for memory leaks.

Being someone who has used valgrind frequently to check for memory leaks in my code for the last year or two, I suddenly came to think that it only detects lost/unfreed memory after the life of the program.

So, in light of that, I was thinking that if you have a long-running program which malloc()‘s intermittently and doesn’t free() until the application exits, then the potential to eat memory (not necessarily through leaks) is huge and isn’t observable using these tools because they only check after the programs lifetime. Are there GDB-like tools which can stop an application while running and check for memory which is and isn’t referenced at an instance in the life of the application?

  • 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-26T13:00:53+00:00Added an answer on May 26, 2026 at 1:00 pm

    Are there GDB-like tools which can stop an application while running and check for memory which is and isn’t referenced at an instance in the life of the application?

    Yes: Valgrind.

    Specifically, the SVN version of Valgrind has a gdbserver stub embedded into it.

    This allows you to do all kinds of cool debugging, not possible before:

    • You can run program under valgrind and have GDB breakpoints at the same time
    • You can ask valgrind: is this memory allocated? was this variable initialized?
    • You can ask valgrind: what new leaks happened since last time I asked for leaks?

    I think you can also ask it to list not-leaked new allocations.

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

Sidebar

Related Questions

I know this is a simple question for someone out there, but I have
I am hoping someone can help me out with a quick question I have
I have a question out of curiosity about the inner workings of Doctrine2. I
This question is mainly out of curiosity (I have a different working solution to
This is just an out of curiosity question. Let's say you have a database
This is a question more out of curiosity rather than being stuck. I know
Its just a question out of curiosity. Suppose we have an associative array A.
This is just a question out of curiosity since I have been needing to
ASP.Net MVC3 is cool and all but I have this question more out of
I have a question about laying out some swing components. Say, I have a

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.