filmov
tv
CppCon 2018: Bob Steagall “Fancy Pointers for Fun and Profit”
Показать описание
—
—
In modern C++ it is possible to implement user-defined types that closely mimic the behavior of ordinary pointers; these types are often referred to as fancy (or synthetic) pointers. With such types at one's disposal, it becomes feasible to build standard-conforming allocators that support relocatable memory in a way that is compatible with the standard containers. This, in turn, enables the use of the standard containers in applications like shared-memory databases, self-contained private heaps, and lightweight object persistence.
This talk will describe a small set of components that implement synthetic pointers. We'll begin by looking briefly at a couple of motivating problems, and then review how the standard defines "pointer-like types". We'll then discuss how closely a user-defined type can emulate ordinary pointers and sketch out a strategy for implementing such a type using the concepts of addressing model, storage model, and pointer interface.
We'll jump into the deep end by implementing two different addressing models, offset addressing and based 2D addressing, which act as policy types for a synthetic pointer class template. We'll then review simple storage models that support raw memory allocation for both addressing models before examining the synthetic pointer class in detail. We'll discuss how the synthetic pointer class interacts with the addressing models to implement pointer operations and emulate an ordinary pointer's interface.
Finally, the talk will provide an example of how these concepts can be applied - namely, containers in a self-contained private heap.
—
Bob Steagall, KEWB Computing
CppCon Poster Chair
I've been working in C++ since discovering the second edition of The C++ Programming Language in a college bookstore in 1992. 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 detour through the world of DNS and analytics, I'm now working in the area of distributed stream processing. I'm a relatively new member of the C++ Standardization Committee, and launched a blog earlier this year to write about C++ and related topics. I hold BS and MS degrees in Physics, and I'm an avid cyclist when weather permits.
—
*-----*
—
In modern C++ it is possible to implement user-defined types that closely mimic the behavior of ordinary pointers; these types are often referred to as fancy (or synthetic) pointers. With such types at one's disposal, it becomes feasible to build standard-conforming allocators that support relocatable memory in a way that is compatible with the standard containers. This, in turn, enables the use of the standard containers in applications like shared-memory databases, self-contained private heaps, and lightweight object persistence.
This talk will describe a small set of components that implement synthetic pointers. We'll begin by looking briefly at a couple of motivating problems, and then review how the standard defines "pointer-like types". We'll then discuss how closely a user-defined type can emulate ordinary pointers and sketch out a strategy for implementing such a type using the concepts of addressing model, storage model, and pointer interface.
We'll jump into the deep end by implementing two different addressing models, offset addressing and based 2D addressing, which act as policy types for a synthetic pointer class template. We'll then review simple storage models that support raw memory allocation for both addressing models before examining the synthetic pointer class in detail. We'll discuss how the synthetic pointer class interacts with the addressing models to implement pointer operations and emulate an ordinary pointer's interface.
Finally, the talk will provide an example of how these concepts can be applied - namely, containers in a self-contained private heap.
—
Bob Steagall, KEWB Computing
CppCon Poster Chair
I've been working in C++ since discovering the second edition of The C++ Programming Language in a college bookstore in 1992. 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 detour through the world of DNS and analytics, I'm now working in the area of distributed stream processing. I'm a relatively new member of the C++ Standardization Committee, and launched a blog earlier this year to write about C++ and related topics. I hold BS and MS degrees in Physics, and I'm an avid cyclist when weather permits.
—
*-----*
Комментарии