Jan 12, 2020

Value Proposition: Allocator-Aware (AA) Software

by Pablo Halpern and John Lakos.

View the full article Allocator-Aware (AA) Software

Abstract

The performance benefits of employing local memory allocators are well known and substantial. Still, the real-world costs associated with integrating allocators throughout a code base, including related training, tools, interface and contract complexity, and increased potential for inadvertent misuse, cannot be ignored. A fully allocator-aware (AA) software infrastructure (SI) offers a convincing value proposition despite substantial upfront costs. The collateral benefits for clients, such as object-based instrumentation and effective means of testing allocations, make investing in AASI even more compelling. Yet many other unwarranted concerns - based on hearsay or specious conjecture - remain.

In this paper, we discuss all three currently available AA software models, C++11, BDE, and PMR (C++17) - each of which provides basically the same essential benefits but requires widely varying development and maintenance effort. We then separate real from imagined costs, presenting some of the many collateral benefits of AASI along the way. After all aspects are considered, we continue to advocate for the adoption of AA software today for all libraries that potentially have performance-sensitive clients and specifically for the BDE/PMR model, even as we continue to research a language-based solution that might someday all but eliminate the costs while amplifying the benefit.