The Wayback Machine - https://web.archive.org/web/20200727035533/https://github.com/electronicarts/EASTL
Skip to content
master
Go to file
Code

Latest commit

Old implementation confused GCC 9 (reproduced on 9.1.1 & 9.3.1, not
reproduced on earlier versions) on string assigment of
exact SSO_CAPACITY (23) length. It caused
SSO string to be non-terminated and further segfault on attempt
to interpret actual string content as pointers data (i.e. heap string)

New propsed implementation works with all major compilers including
GCC, MSVC & Clang (tested both normal & sanitized builds in fairly
large commertial project)

Note on implementation:
* Don't memset whole string in default ctor anymore (as for empty
initialized SSO string we don't need to change anything besides
first null-terminated character & mnRemainingSize) - this should
save a few cycles on default string ctor which is quite frequently
executing code
* AllocateSelf(size_type n) now sets size of string to passed size
(instead of 0 as it was before), which is usefull in much more
cases then old behaviour (most of ctors calls {Size,Range}Initialize()
which calls this method). This also reduces number of overwrites for
SSO string size, which is also should be win for not-so-smart compilers
that lacks (or have poor) "dead store elimination" optimization

Change-Id: I2618f7be4777760d45f8094300694d173d4ce332

Co-authored-by: Vladimir 'virtul' Ivannikov <v.ivannikov@gaijin.ru>
6dd19c1

Git stats

Files

Permalink
Failed to load latest commit information.

README.md

EA Standard Template Library

Build Status

EASTL stands for Electronic Arts Standard Template Library. It is a C++ template library of containers, algorithms, and iterators useful for runtime and tool development across multiple platforms. It is a fairly extensive and robust implementation of such a library and has an emphasis on high performance above all other considerations.

Usage

If you are familiar with the C++ STL or have worked with other templated container/algorithm libraries, you probably don't need to read this. If you have no familiarity with C++ templates at all, then you probably will need more than this document to get you up to speed. In this case, you need to understand that templates, when used properly, are powerful vehicles for the ease of creation of optimized C++ code. A description of C++ templates is outside the scope of this documentation, but there is plenty of such documentation on the Internet.

EASTL is suitable for any tools and shipping applications where the functionality of EASTL is useful. Modern compilers are capable of producing good code with templates and many people are using them in both current generation and future generation applications on multiple platforms from embedded systems to servers and mainframes.

Package Managers

You can download and install EASTL using the Conan package manager:

conan install eastl/3.15.00@

The EASTL package in conan is kept up to date by Conan team members and community contributors. If the version is out-of-date, please create an issue or pull request on the Conan Center Index repository.

You can download and install EASTL using the vcpkg dependency manager:

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
vcpkg install eastl

The EASTL port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please create an issue or pull request on the vcpkg repository.

Documentation

Please see EASTL Introduction.

Compiling sources

Please see CONTRIBUTING.md for details on compiling and testing the source.

Credits

EASTL was created by Paul Pedriana and he maintained the project for roughly 10 years.

Roberto Parolin is the current EASTL owner within EA and is responsible for the open source repository.

Significant EASTL contributions were made by (in alphabetical order):

  • Avery Lee
  • Colin Andrews
  • JP Flouret
  • Liam Mitchell
  • Matt Newport
  • Max Winkler
  • Paul Pedriana
  • Roberto Parolin
  • Simon Everett

License

Modified BSD License (3-Clause BSD license) see the file LICENSE in the project root.

About

EASTL stands for Electronic Arts Standard Template Library. It is an extensive and robust implementation that has an emphasis on high performance.

Topics

Resources

License

Languages

You can’t perform that action at this time.