[Tarantool-patches] [PATCH small 0/2] Aligned lsregion

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Fri May 15 02:31:02 MSK 2020


The patchset introduces a new function - lsregion_aligned_alloc().
This activity goes in scope of the big issue about lots of
'undefined behaviour' cases among Tarantool sources. One and the
biggest of which is unaligned memory access.

Currently lsregion is used in vinyl for statements and BPS tree
blocks. All of them are not aligned. Addresses are absolutely
arbitrary, sometimes even odd, like ending with 1, 9, etc.

Not counting UB, this is also slower, may be much slower sometimes.

Branch: http://github.com/tarantool/small/tree/gerold103/aligned-lsregion
Issue: https://github.com/tarantool/tarantool/issues/4609

Vladislav Shpilevoy (2):
  lsregion: introduce lsregion_reserve()
  lsregion: provide aligned version of alloc

 small/lsregion.c | 12 ++-----
 small/lsregion.h | 78 +++++++++++++++++++++++++++++++++---------
 test/lsregion.c  | 88 +++++++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 152 insertions(+), 26 deletions(-)

-- 
2.21.1 (Apple Git-122.3)



More information about the Tarantool-patches mailing list