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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:57:12+00:00 2026-05-12T11:57:12+00:00

Dynamic allocations with new/delete are said to take place on the free-store , while

  • 0

Dynamic allocations with new/delete are said to take place on the free-store,
while malloc/free operations use the heap.

I’d like to know if there is an actual difference, in practice.
Do compilers make a distinction between the two terms? (Free store and Heap, not new/malloc)

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

    See http://www.gotw.ca/gotw/009.htm; it can describe the differences between the heap and the free-store far better than I could:

    Free-store:

    The free store is one of the two
    dynamic memory areas, allocated/freed
    by new/delete. Object lifetime can be
    less than the time the storage is
    allocated; that is, free store objects
    can have memory allocated without
    being immediately initialized, and can
    be destroyed without the memory being
    immediately deallocated. During the
    period when the storage is allocated
    but outside the object’s lifetime, the
    storage may be accessed and
    manipulated through a void* but none
    of the proto-object’s nonstatic
    members or member functions may be
    accessed, have their addresses taken,
    or be otherwise manipulated.

    Heap:

    The heap is the other dynamic memory
    area, allocated/freed by malloc/free
    and their variants. Note that while
    the default global new and delete
    might be implemented in terms of
    malloc and free by a particular
    compiler, the heap is not the same as
    free store and memory allocated in one
    area cannot be safely deallocated in
    the other. Memory allocated from the
    heap can be used for objects of class
    type by placement-new construction and
    explicit destruction. If so used, the
    notes about free store object lifetime
    apply similarly here.

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

Sidebar

Related Questions

I was advised a while ago that is was common place to use std::vector
I'm using the RTL as a dynamic library. This allows for an overridden new/delete
What is the time complexity of dynamic memory allocation using new, malloc, etc.? I
The dynamic memory allocation operators - new and delete can be overridden for a
Possible Duplicates: Malloc a 3-Dimensional array in C? dynamic allocation/deallocation of 2D & 3D
Looks like dynamic memory allocation without garbage collection is a way to disaster. Dangling
suppose I need to allocate and delete object on heap frequently (of arbitrary size),
salute.. I am learning dynamic allocations for multidimensional arrays in a book and I
I need to create a pool of objects to eliminate dynamic allocations. Is it
I am learning C++. I am trying to learn this dynamic memory allocation. In

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.