Version 3: Single-Threaded Variable-Size Memory Manager

Speeding up the allocation and deallocation of fixed-size memory will only take you so far. There is a class of applications that require variable-size memory allocations. A Web server implementation is a perfect example. Typical implementations of a Web server are gigantic string crunchers. If you peek into the code you'll find that the handling of a single HTTP request requires a large number of string surgeries. Many of those calls require space allocation to create new or duplicated strings. Furthermore, you cannot tell in advance how many string allocations would be necessary and of what size. Potentially, strings are unbounded. The nature of string manipulations is dictated by the ...

Get Efficient C++ Performance Programming Techniques now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.