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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:14:25+00:00 2026-05-25T15:14:25+00:00

I am using SFML, which handles most of it’s memory through std::vector<Uint32> and other

  • 0

I am using SFML, which handles most of it’s memory through std::vector<Uint32> and other types similar to that. All declarations use the default Allocator. The SFML library is compiled into .lib files that are statically linked against in Visual Studio. (I possess all the source code to it however if needed.)

My question is, what would be the least painful method of forcing SFML to use my custom small-objects/thread-safe allocator for STL containers, instead of the default? The less I need to alter the library itself, the better of course!

Edit:

If it helps at all, forget the implementation of the library; I can recompile that on the whim. For the sake of the question, imagine it’s my code I am using. My goal is to change the default Allocator that all STL containers use, essentially.

Edit2:

If that is not at all possible, would overriding new itself be a proper method? I have read around that the default allocator is nothing more than sugar coating on the new/delete operations.

  • 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-25T15:14:25+00:00Added an answer on May 25, 2026 at 3:14 pm

    Well, the most ‘bruteforce’ or foolproof method would seem to create a preload library that implements malloc/free (and friends?)

    This is usually the way in which heap debuggers/bounds checkers operate.

    However, I know nothing about the SFML allocator requirements, so it might not work if the space is very limited. In that case, I suggest ‘marshaling’ (fancy word for copying) the data over to the custom-allocated regions when needed

    Tangentially related:

    Eletronics Art has a ‘port’ of STL for game development. It is heavilty geared to custom allocators (in fact, it comes without a default one!). You can have a look at

    • EASTL http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html
    • at github
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I'm sending, for example, 1234, the server, which is C++ using SFML library
I've recently started using SFML and noticed that there aren't any kinds of FreeResource
I pulled out an application that I wrote in C++ using the sfml library,
Using ASP.NET MVC there are situations (such as form submission) that may require a
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Using C#, I need a class called User that has a username, password, active
I'm using SFML for input system in my application. size_t WindowHandle; WindowHandle = ...;
I'm using SFML, and I want to use Qt Creator in conjunction with it.
I was doing the tutorials for SFML on using OpenGl and I encountered this
I've been working on testing a few things out using SFML 1.4 (Simple and

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.