O'Reilly logo

Efficient C++ Performance Programming Techniques by David Mayhew, Dov Bulka

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required