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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:43:24+00:00 2026-05-23T11:43:24+00:00

I have been taking a look at MMGR for a memory allocation checker and

  • 0

I have been taking a look at MMGR for a memory allocation checker and I have a few questions that I don’t see anywhere else on the internet.

1) There is a “reported size” and an “actual size”. I understand what the “reported size” is, with it being the size that new receives, however, what is “actual size”? Why is there a difference?

2) Is the logging exactly safe? I see that the logging happens at the end of a static deallocation of a class, however, could this give a false positive of memory leaks?
2A) Just to be sure, static deallocations always happen last, right?

3) Is this code thread safe? If not, how can it become thread safe?

  • 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-23T11:43:25+00:00Added an answer on May 23, 2026 at 11:43 am

    I’m afraid I do not have any experience with MMGR, so I can only provide an answer for your first question.

    The reason some memory debuggers mention a reported (or requested) and an actual allocation size has to do with the way memory allocators work. They rarely allocate exactly the requested size – usually they reserve a bit more. There are various possible reasons:

    • Alignment issues: I don’t think that there is an allocator that will allocate e.g. exactly 3 bytes on a modern 32-bit (or more) system. The value will be rounded to at least the next multiple of the word-size or 4, depending on the architecture.

    • Management issues: some allocators will only handle allocations sized to powers of two. So you get blocks of 4, 8, 16, 32, 64, 128, 256 etc bytes. This is rare in userspace allocators, but common in kernel-space ones.

    • Providence: Some allocators will allocate a bit more each time in anticipation of a possible reallocation.

    In any case, the reserved memory will often be somewhat more than the amount requested, hence the existence of two numbers.

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

Sidebar

Related Questions

I have been taking a few graduate classes with a professor I like alot
In the data structures class that I am currently taking, we have been tasked
Have been looking at the MVC storefront and see that IQueryable is returned from
I have been taking a look around and the most popular .NET drivers for
Okay, so far, I have been taking computer science courses in my high school
I have been considering taking the plunge and installing Linux on my Playstation 3.
I'm just taking a look at Sproutcore (gem version 1.6.0.1) to see what I
I have been tasked with taking an Access 97 application and moving the back-end
Thanks for taking a look at my post. I've been working with linq to
Ok so, I have been working on a small webapp in sinatra. After taking

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.