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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:19:54+00:00 2026-05-23T09:19:54+00:00

For the Standard allocator interface for use in, say, std::vector , is re-allocation supported?

  • 0

For the Standard allocator interface for use in, say, std::vector, is re-allocation supported? I have a rather specific use-case in which being able to realloc directly would be much more efficient than allocating, moving, and freeing.

Edit: Sorry- I have absolutely no intention of calling the actual realloc, I meant a function with those semantics. Effectively, I’m allocating off a stack in the background, and if I allocate more off the stack, then I can’t free the memory underneath it, which is a total waste because there’s no need to allocate again anyway as there’s plenty of contiguous free space available. Thus, if I could be asked to reallocate in a single step, then I could avoid having to firstly, allocate some stuff and waste some memory, and secondly, move all the contents of the vector.

  • 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-23T09:19:54+00:00Added an answer on May 23, 2026 at 9:19 am

    We tried but failed:

    http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1953.html

    http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2045.html

    Edit: I know what you meant. 😉

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

Sidebar

Related Questions

I have an class and I would like to use the standard library list
Using MSVC2010... I have a struct that wraps a std::string, with standard move ctor's
So standard Agile philosophy would recommend making your domain classes simple POCOs which are
In standard SQL, is there a way to say: select mubmle as x from
On an embedded type system, I have created a Small Object Allocator that piggy
I'm looking for a C++ container that's a cross between boost::array, boost::scoped_array and std::vector.
I have a function, foo(), that allocates memory and returns it. Is it standard
What are some really good reasons to ditch std::allocator in favor of a custom
Why isn't standard C++03 interface for querying member types for allocators used in C++0x?
I replaced the Standard allocator with an allocator that will phone home about how

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.