• Evan Wallace's avatar
    Round up allocation size to avoid misalignment (issue #226) · 47aab782
    Evan Wallace authored
    Before this change, requesting a large initial allocation could cause the
    backing store to grow to an unaligned size. Since memory inside vector_downward
    is relative to the end of the buffer, this then caused all memory in the buffer
    to be misaligned and also misaligns any further loads and stores. Misaligned
    loads and stores are undefined behavior and don't work in environments such as
    emscripten (a JavaScript to C++ compiler).
    47aab782
Name
Last commit
Last update
CMake Loading commit data...
android Loading commit data...
biicode Loading commit data...
build Loading commit data...
docs Loading commit data...
go Loading commit data...
include/flatbuffers Loading commit data...
java Loading commit data...
net/FlatBuffers Loading commit data...
python Loading commit data...
reflection Loading commit data...
samples Loading commit data...
src Loading commit data...
tests Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CMakeLists.txt Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE.txt Loading commit data...
biicode.conf Loading commit data...
readme.md Loading commit data...