Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Fancy Pointers for Fun and Profit

CppNow via YouTube

Overview

Explore the intricacies of implementing user-defined types that mimic ordinary pointers in modern C++ through this comprehensive conference talk. Dive into the concept of fancy or synthetic pointers and their applications in building standard-conforming allocators for relocatable memory, compatible with standard containers. Learn how these components enable the use of standard containers in shared-memory databases, self-contained private heaps, and lightweight object persistence. Examine two addressing models - 2D addressing and offset addressing - as policy types for a synthetic pointer class template, and investigate simple storage models supporting raw memory allocation. Analyze the synthetic pointer class in detail, focusing on its interaction with addressing models to implement pointer operations and emulate an ordinary pointer's interface. Discover alternative implementations and practical applications, including containers in shared memory and self-contained private heaps. Gain insights from Bob Steagall's 25 years of C++ experience across medical imaging, DNS, analytics, and distributed stream processing fields.

Syllabus

Introduction
Outline
Summary
Motivation
Serialization
Intermediate Format
Costs
Intermediate formats
Object persistence
Standard layout types
Not relocatable types
Addressing and allocation
Addressing model
Pointer interface
Allocation strategy
Thread safety transaction safety
Notes on synthetic pointers
Runtime cost
Framework
Framework Types
Addressing Models
Wrapper Addressing Model
Why the Union
Tactical Decision
Segment Address
Segment Offset
TwoDimensional Mask Addressing
Offset Addressing
Helper Functions
Null Offset
Helper Traits
Type Deaths
Iterators
Assignments
Comparison Helpers
Monotonic Allocation
Allocator
Results

Taught by

CppNow

Reviews

Start your review of Fancy Pointers for Fun and Profit

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.