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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:58:48+00:00 2026-05-24T10:58:48+00:00

It seems to me that this is how memory works in C++: If you

  • 0

It seems to me that this is how memory works in C++:

If you use new then you are asking the compiler’s implementation to give you some memory (any memory) from the heap.

If you use the placement new syntax, the you are asking to re-allocate a specific memory location that you already know the address of (let’s just assume it is also from the heap) which presumably was also originally allocated from the new operator at some point.

My question is this:

Is there anyway to know which memory locations are available to your program a priori (i.e. without re-allocating memory from the heap that was already given to you by the new operator)?

Is the memory in the heap contiguous? If so, can you find out where it starts and where it ends?

p.s. Just trying to get as close to the metal as possible as fast as possible…

  • 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-24T10:58:49+00:00Added an answer on May 24, 2026 at 10:58 am

    Not in any portable way. Modern operating systems tend to use paging (aka virtual memory) anyway, so that the amount of memory available is not a question that can be easily answered.

    There is no requirement for the memory in the heap to be contiguous, if you need that you are going to have to write your own heap, which isn’t so hard to do.

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

Sidebar

Related Questions

I noticed that this recipe seems to use __rlshift__ , __ror__ like operators. But,
Following this question, it seems that it is possible to open a file from
From this link gdb interpret memory address as an object we know that, if
Seems that This will be an easy question for you but this problem is
It seems that this part of my code is where the exception occurs: c
I've been searching around for the answer and everything seems to lead that this
It seems that often __init__ methods are similar to this: def __init__(self, ivar1, ivar2,
It seems that i cannot access $(this) inside jquery ajax success function. please see
I googled this and it seems that no one has an answer, yet it
It seems that when a WPF application starts, nothing has focus. This is really

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.