EASTL (EA) Source-Level Deep Analysis
Source path:
references/impl/EASTL/include/EASTL/
EASTL is an STL replacement implementation open-sourced by Electronic Arts in 2007. Redesigned for game runtime environments: deterministic memory behavior, zero exception overhead, explicit allocator control.
Core Design Philosophy
EASTL's central argument: the standard STL's design assumes "general-purpose computing," whereas game engines require "predictable real-time computing."
Table of Contents
| Chapter | Source Path | Content |
|---|---|---|
| Allocator Model | allocator.h | Non-template instantiation, dual allocate overloads, dummy_allocator, debug naming |
| fixed_* Containers | fixed_vector.h, fixed_string.h | Inline buffer, overflow mechanism, aligned_buffer |
| Intrusive Containers and Hashtable | intrusive_list.h, hashtable.h | Intrusive design, open-addressing hash, red-black tree |
| String, Span, and Sort | string.h, span.h, sort.h | Three-tier storage string, Span view, radix sort |
Comparison with Standard Library
| Dimension | EASTL | std (Standard) |
|---|---|---|
| Allocator | non-template, instance-passed | template parameter binding |
| Exceptions | completely unused | relies on exceptions |
| SSO | implementation-dependent | 15-22 bytes |
| fixed containers | native support | none (requires std::pmr) |
| Intrusive containers | native support | none |
| Game engine | design target | not a target |
| Generality | game/embedded | general-purpose |