<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Thanks for the patch! see comments below.<br>
</p>
<div class="moz-cite-prefix">On 5/15/20 2:31 AM, Vladislav Shpilevoy
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:cover.1589498880.git.v.shpilevoy@tarantool.org">
<pre class="moz-quote-pre" wrap="">The patchset introduces a new function - lsregion_aligned_alloc().
</pre>
</blockquote>
<p>Actually you don't need the patch for fixing #4609.<br>
If you want to align vy_mem tuple by 4 bytes (due to uint32_t
bsize), all you need is:</p>
<p><font size="-1">diff --git a/src/box/vy_stmt.c
b/src/box/vy_stmt.c<br>
index adc3ba4..2de4a28 100644<br>
--- a/src/box/vy_stmt.c<br>
+++ b/src/box/vy_stmt.c<br>
@@ -228,7 +228,7 @@ vy_stmt_dup_lsregion(struct tuple *stmt,
struct lsregion *lsregion,<br>
if (type == IPROTO_UPSERT)<br>
alloc_size++;<br>
<br>
- mem_stmt = lsregion_alloc(lsregion, alloc_size,
alloc_id);<br>
+ mem_stmt = lsregion_alloc(lsregion,
small_align(alloc_size, 4), alloc_id);<br>
if (mem_stmt == NULL) {<br>
diag_set(OutOfMemory, size, "lsregion_alloc",
"mem_stmt");<br>
return NULL;</font></p>
<p>lsregion will allocate aligned addresses as long as you request
only aligned sizes,<br>
up to sizeof(uintptr_t) (see lslab_sizeof()).<br>
This property is not documented (maybe it should be!). It is also
similar to mempool<br>
property, see mempool_create description.</p>
<p>I like one-line change more.<br>
</p>
<p>If you still want _reserve and _aligned_alloc method for further
purposes, please<br>
read my by-commit comments.<br>
</p>
</body>
</html>