New paper: N3575, Additional Standard allocation schemes -- Mark Boyall

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N3575

Date: 2013-03-10

Additional Standard allocation schemes

by Mark Boyall


The Standard provides an allocator abstraction, but does not provide any useful allocators beyond the default. This means that every user must roll their own memory allocators for non-trivial allocation schemes. Many of these schemes are common and are quite suitable for Standardization. They are also prone to subtle errors, especially where those supporting concurrent use, are concerned. Shipping these allocators in the Standard would significantly increase the ability of users to improve the performance of their programs with minimal effort. In addition, a more suitable choice of default allocator for some containers could provide a substantial speedup for existing user programs with no effort on their behalf. Finally, synchronization is an issue. Hidden synchronization inside allocators can result in unnecessary performance drains. Now that the Standard includes concurrency, it is necessary to deal with its costs in Standard mechanisms. Code which runs on one thread, either because that program simply does not use concurrency or because that specific subset is single-threaded, must unnecessarily pay the costs of synchronizing calls to the default allocator.

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.