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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:22:07+00:00 2026-05-25T01:22:07+00:00

1) Is there also any memory leak tool called Boehmgc ? How is that

  • 0

1) Is there also any memory leak tool called Boehmgc? How is that tool compared to others?

2) I have used LeakTracer, mudflap and Valgrind. But unfortunately LeakTracer has the disadvantage of memory hogging (pooling a lot of memory at start and then allocating it), so what are the alternatives?

  • 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-25T01:22:07+00:00Added an answer on May 25, 2026 at 1:22 am

    Boehm GC is a garbage collector, similar to the garbage collection in Java. The other tools you mention are designed to warn you about leaks, such that you can take corrective action. Garbage collection is designed to find and recover no-longer used allocations, as the program runs. Example (from wikipedia page):

    #include <assert.h>
    #include <stdio.h>
    #include <gc.h>
    
    int main(void)
    {
        int i;
    
        GC_INIT();
        for (i = 0; i < 10000000; ++i)
        {
            // GC_MALLOC instead of malloc
            int **p = GC_MALLOC(sizeof(int *));
            int *q = GC_MALLOC_ATOMIC(sizeof(int));
    
            assert(*p == 0);
            // GC_REALLOC instead of realloc
            *p = GC_REALLOC(q, 2 * sizeof(int));
            if (i % 100000 == 0)
                printf("Heap size = %zu\n", GC_get_heap_size());
        }
    
        // No free()
    
        return 0;
    }
    

    Personally there’s something about using garbage collection in C or C++ that makes me quite uneasy. For C++ “Smart pointers” are the way to go in my opinion in scenarios where ownership is unclear (although you might want to have a thing about why it’s unclear in your design) and for help with exception safety (E.g. what the now deprecated std::auto_ptr was designed for)

    As for the leak detectors you can add:

    • ccmalloc
    • dmalloc
    • NJAMD (Not just another memory debugger)
    • mpatrol
    • YAMD (yet another malloc debugger)

    To your list of Linux ones.

    Related memory checking tools, but not leaks:

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

Sidebar

Related Questions

I have noticed that my application is causing a substantial memory leak in firefox
If it's any help, there is also a similar class in C#'s WebRequest. Although
Is there any way to use ActiveRecord calculations while also acquiring relevant field names?
Is there any way to specify a width when doing :vsplit? Also, is there
Is there any alternatives to the print statement for output in Python. Also, how
I have a bit of a memory leak issue in my Flex application, and
I have used Totalview's Memoryscape to do some memory leaks checks and I have
Memory leak is, when there is unused memory in application and GC can collect
I found there are also a pthread in Boost library, is it the same
There seem to be a .CFI directive after every line and also there are

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.