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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:07:41+00:00 2026-05-18T05:07:41+00:00

_CrtDumpMemoryLeaks(); if you didn’t know, is a function that dumps all the memory leaks

  • 0

_CrtDumpMemoryLeaks(); if you didn’t know, is a function that dumps all the memory leaks in a program. Mine currently displays that I have a 3632062 byte memory leak (it’s not being deallocated).

I was wondering:
Is there any way to cause Visual C++ Express to break when a certain amount of bytes has been allocated? That way I could break when 3632062 bytes have been allocated, then read the stack trace to see where I allocated it.

This is currently the only method I can think of for finding where the memory is being allocated so I can fix it. I’ve been searching my code a lot but I can’t find anywhere where I would need to allocate 3632062 bytes (since the only file I load is 2767136 bytes..) although I am certain the leak is related to the file I’m operating on.

Any ideas for finding the source of the memory leak? I’m using Native C++, Visual C++ 2010

  • 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-18T05:07:42+00:00Added an answer on May 18, 2026 at 5:07 am

    You could do this using _CrtSetAllocHook to track the total memory usage.

    UMDH will give you a list of allocated blocks in all heaps. This might be what you want, since breaking on hitting a given total alloc threshold will not tell you where all of the blocks were allocated.

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

Sidebar

Related Questions

I am trying to use _CrtDumpMemoryLeaks() to display memory leaks in my program. But
I am writing a custom textfile-data parser (JSON-like) and I have lost many hours
I'm using Visual CRT's memory leak detection routines from <crtdbg.h> ; when I call
Is it possible to output the contents of the memory leak dump to a
why i'm getting the memory leak errors without allocating or adding any elements to
hey i am trying to detect leaks in visual studio using : #define _CRTDBG_MAPALLOC
I'm working on an MFC Visual C++ project. As I understand from MSDN ,

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.