CppCon 2017: Bob Steagall “How to Write a Custom Allocator”

preview_player
Показать описание


You'd like to improve the performance of your application with regard to memory management, and you believe this can be accomplished by writing a custom allocator. But where do you start? Modern C++ brings many improvements to the standard allocator model, but with those improvements come several issues that must be addressed when designing a new allocator.

This talk will provide guidance on how to write custom allocators for the C++14/C++17 standard containers. It will cover the requirements specified by the standard, and will describe the facilities provided by the standard to support the new allocator model and allocator-aware containers. We'll look at the issues of allocator identity and propagation, and examine their implications for standard library users, standard library implementers, and custom allocator implementers. We'll see how a container uses its allocator, including when and how a container's allocator instance propagates. This will give us the necessary background to describe allocators that implement unusual semantics, such as a stateful allocator type whose instances compare non-equal. Finally, the talk will provide some guidelines for how to specify a custom allocator's public interface based on the semantics it provides.

Bob Steagall: KEWB Computing, CppCon 2017 Poster Chair

I've been working in C++ for the last 25 years. The majority of my career has been spent in medical imaging, where I led teams building applications for functional MRI and CT-based cardiac visualization. After a brief journey through the world of DNS and analytics, I'm now working in the area of stream processing.


*-----*
*-----*
Рекомендации по теме
Комментарии
Автор

Watching this after John Lakos' talk
Such a beautiful follow up

sicko
Автор

Don't watch this talk if you are looking for some code examples. The subject is more like "What traits and types you should study in order to be able to write a custom allocator". Good material though.

seidenada
Автор

Very good presentation. He must have done a lot of research and studying to compile the content for this presentation.

kinershah
Автор

20:10 deep propagation of alligators

pretty scary!

tohopes
Автор

I love this man! thanks for these wonderful presentations!

fwang
Автор

i do not support alligator propagation. We have enough of them already.

sproccoli
Автор

Anyone care to explain what the example at 11:00 is, or how it can be used? Because I have no clue whatsoever

lorenzobolis
Автор

Very informative, but Bob needs to incorporate some levity and differ the pitch of his voice from time to time. I nearly fell asleep.

anon_y_mousse
Автор

Why can't we just use new and delete again?

pajeetsingh